Category: Data Structure
-
What are the advantages of doubly linked list over singly linked list?
The doubly linked list has two pointer fields. One field is previous link field and another is next link field. Because of these two pointer fields we can access any node efficiently whereas in singly linked list only one pointer field is there which stores forward pointer.
-
State the advantages of circular lists over doubly linked list.
In circular list the next pointer of last node points to head node, whereas in doubly linked list each node has two pointers: one previous pointer and another is next pointer. The main advantage of circular list over doubly linked list is that with the help of single pointer field we can access head node…
-
State the properties of LIST abstract data type with suitable example.
Various properties of LIST abstract data type are(i) It is linear data structure in which the elements are arranged adjacent to each other.(ii) It allows to store single variable polynomial.(iii) If the LIST is implemented using dynamic memory then it is called linked list. Example of LIST are- stacks, queues, linked list.
-
Difference between arrays and lists.
In arrays any element can be accessed randomly with the help of index of array, whereas in lists any element can be accessed by sequential access only. Insertion and deletion of data is difficult in arrays on the other hand insertion and deletion of data is easy in lists.
-
Write down the steps to modify a node in linked lists.
➢ Enter the position of the node which is to be modified.➢ Enter the new value for the node to be modified.➢ Search the corresponding node in the linked list.➢ Replace the original value of that node by a new value.➢ Display the messages as “The node is modified”.
-
Define doubly linked list.
Doubly linked list is a kind of linked list in which each node has two link fields. One link field stores the address of previous node and the other link field stores the address of the next node.
-
What are the pitfall encountered in singly linked list?
Following are the pitfall encountered in singly linked list
-
What is a linked list?
A linked list is a set of nodes where each node has two fields ‘data’ and ‘link’. The data field is used to store actual piece of information and link field is used to store address of next node.
-
List out the areas in which data structures are applied extensively.
Following are the areas in which data structures are applied extensively. • Operating system- the data structures like priority queues are used for scheduling the jobs in the operating system.• Compiler design- the tree data structure is used in parsing the source program. Stack data structure is used in handling recursive calls.• Database management system-…
-
What is abstract data type? What are all not concerned in an ADT?
The abstract data type is a triple of D i.e. set of axioms, F-set of functions and A-Axioms in which only what is to be done is mentioned but how is to be done is not mentioned. Thus ADT is not concerned with implementation details.
