Showing posts with label Data Structures - Unit 2. Show all posts
Showing posts with label Data Structures - Unit 2. Show all posts

Sunday, November 9, 2014

Data Structures - Unit 2

1.Explain the linked list implementation of list ADT in Detail? 

. Definition for linked list
. Figure for linked list
. Next pointer
. Header or dummy node
. Various operations
• Explanation
• Example figure
• Coding

2. Explain the cursor implementation of linked list? 
. Definition for linked list
. Figure for linked list
. Next pointer
. Header or dummy node
. Various operations
• Explanation
• Example figure
• Coding


3. Explain the various applications of linked list? 
. Polynomical ADT
• Operations
• Coding
• Figure
. Radix Sort
• Explanation
• Example
. Multilist
• Explanation
• Example figure

4. Explain the linked list implementation of stack ADT in detail?
. Definition for stack
. Stack model
. Figure
. Pointer-Top
. Operations
• Coding
• Example figure

5. Explain the array implementation of queue ADT in detail? 
. Definition for stack
. Stack model
. Figure
. Pointer-FRONT, REAR
. Operations
• Coding
• Example figure 

Saturday, November 8, 2014

Data Structures - Unit 2

1. What is the need for the header? 
Header of the linked list is the first element in the list and it stores the number of elements in the list. It points to the first data element of the list.

2. List three examples that uses linked list? 
• Polynomial ADT
• Radix sort
• Multi lists

3. Give some examples for linear data structures? 
• Stack
• Queue

4. What is a stack?
Stack is a data structure in which both insertion and deletion occur at one end only. Stack is maintained with a single pointer to the top of the list of elements. The other name of stack is Last-in -First-out list.

5. Write postfix from of the expression –A+B-C+D?
A-B+C-D+

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