Friday, November 7, 2014

Data Structures - Unit 2

1.What is meant by an abstract data type? 

An ADT is a set of operation. Abstract data types are mathematical abstractions.Eg.Objects such as list, set and graph along their operations can be viewed as ADT's.

2. What are the operations of ADT? 
Union, Intersection, size, complement and find are the various operations of ADT.

3. What is meant by list ADT?
List ADT is a sequential storage structure. General list of the form a1, a2, a3.…., an and the size of the list is 'n'. Any element in the list at the position I is defined to be ai, ai+1 the successor of ai and ai-1 is the predecessor of ai.

4. What are the various operations done under list ADT? 
• Print list
• Insert
• Make empty
• Remove
• Next
• Previous
• Find kth

5. What are the different ways to implement list? 
• Simple array implementation of list
• Linked list implementation of list


6. What are the advantages in the array implementation of list? 
a) Print list operation can be carried out at the linear time
b) Find Kth operation takes a constant time

7. What is a linked list? 
Linked list is a kind of series of data structures, which are not necessarily adjacent in memory. Each structure contain the element and a pointer to a record containing its successor.


8. What is a pointer? 
Pointer is a variable, which stores the address of the next element in the list.
Pointer is basically a number.

9. What is a doubly linked list? 
In a simple linked list, there will be one pointer named as 'NEXT POINTER' to point the next element, where as in a doubly linked list, there will be two pointers one to point the next element and the other to point the previous element location.

10. Define double circularly linked list? 
In a doubly linked list, if the last node or pointer of the list, point to the first element of the list, then it is a circularly linked list. 

No comments:

Post a Comment