File

advertisement
DATA STRUCTURES
PART B
UNIT I
1.
i)Design an algorithm to reverse the linked list. Trace it with an example?
ii) Define an efficient representation of two stacks in a given area of memory with n words and
explain.
i)algorithm
 Define a stack and queue
 Delete elements from queue and add it to stack
 Pop elements from stack
 Example and trace
ii)
 figure
 push operation pop operation advantages
 Definition of ADT
 Example: Rational ADT
 Pseudocode of Rational ADT
2.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
3. 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
4.What is a Stack?Explain with example?
 Definition of Stack
 Operations of Stack:PUSH and POP
 Example
5.Write the algorithm for converting infix expression to postfix expression?
 Definition of Expression



Types of expression
Algorithm for infix to postfix expression
Example
7.What is a Queue?Explain its operation with example?
 Definition of Queue
 Operations of Queue:insert and remove
 Example
8.What is a Priority Queue?What are its types?Explain?
 Definition of Priority queue
 Types:Ascending and Descending priority queue
 Array Implementation of priority queue
9.Write an algorithm for inserting and deleting an element from Doubly linked list?Explain
llinear linked implementation of Stack and Queue?
 Introduction to Doubly linked list
 Operations:insertion and deletion with algorithm
 Linked list implementation of Stack
 Linked list implementation of Queue
10. Explain the various applications of linked list?
 Polynomical ADT
 Operations
 Coding
 Figure
 Radix Sort
 Explanation
 Example
 Multilist
 Explanation
 Example figure
11. 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
UNIT II
1.What is a Binary tree?Explain Binary tree traversals in C?
 Definition of Binary tree
 Traversals
 Inorder traversal
 Preorder traversal
 Postorder traversal
2.Explain Representing lists as Binary tree?Write algorithm for finding Kth element and
deleting an element?
 Representing list as Binary tree
 Finding Kth element
 Deleting an element
3.Explain Binary search tree representation?
 Node representation of Binary search tree
 Implicit array representation of Binary tree
 Implementation of various operations
4.What is a Priority Queue?What are its types?Explain?



Definition of Priority queue
Types:Ascending and Descending priority queue
Implementation of priority queue
5.Explain Representing lists as Binary tree?Write algorithm for finding Kth element and deleting
an element?
 Representing list as Binary tree
 Finding Kth element
 Deleting an element
6.Explain Binary tree representation?
 Node representation of Binary tree
 Internal and external nodes
 Implicit array representation of Binary tree
7. Define priority queue? Explain the basic heap operation with an example?
 Definition
 Basic operation






Insert
Delmin
Delmax
Coding
Explanation
Example
UNIT III
1.Write a program to find duplicate numbers in an input list which includes the routines
maketree and setleft?
 Program to find duplicate numbers in an input list
 Routines maketree
 Routines setleft
2.Explain Threaded binary tree with its type?
 Threaded binary tree
 Types: Right-in-threaded binary tree and left-in-threaded binary tree
3.Explain AVL tree in detail?
 Definition
 Creation
 Types of rotation
 Deletion
4. Define AVL trees? Explain the LL, RR, RL, LR case with an example?
 Definition
 LL, RR, RL, LR case
 Figure
 Example
 Explanation
Unit IV
5. Explain any two techniques to overcome hash collision?







Separate chaining
Example
Explanation
Coding
Open addressing
Linear probing
Quadratic
UNIT V
1. Explain hashing with example.
•Hashing techniques
•Example
2. Explain collision resolution strategies?
•Separate chaining
•Open addressing
•Examples
3. Explain extendible hashing?
• Need for extendible hashing
•Procedure
•Example
4. Explain smart union algorithm?
•Smart union algorithm
•Example
5. Explain path compression?
•Definition
•algorithm and example22
UNIT V –GRAPHS
1.Explain Shortest path algorithm with example?
 Shortest path algorithm
 Example
2.Explain Depth first and breadth first traversal?
 Depth first traversal
 Efficiency of Depth first traversal
 Breadth first traversal
3.Explain spanning and minimum spanning tree?
 Spanning tree
 Minimum spanning tree
4.Explain Kruskal’s and prim’s algorithm?
 Kruskal’s algorithm
 Prim’s algorithm
5.Explain topological sorting?
 Definition
 algorithm and example
 implementation
6.Explain the various representation of graph with example in detail?
 Adjacency matrix
 Figure
 Explanation





Table
Adjacency list
Figure
Explanation
Table
7. Define topological sort? Explain with an example?
 Definition
 Explanation
 Example
 Table
 Coding
8. Explain Dijkstra's algorithm with an example?
 Explanation
 Example
 Graph
 Table
 Coding
4.Explain Prim's algorithm with an example?
 Explanation
 Example
 Graph
 Table
 Coding
5. Explain Krushal's algorithm with an example?
 Explanation
 Example
 Graph
 Table
 Coding
Download