CS1201 Data Structures
CS1201 Data Structures
4. What are the problem solving strategies? 5. Define Top Down Design. 7. Define Program Verification. 8. Define Input & Output Assertion. 9. Define Symbolic Execution 10. Define Verification Condition 11. Define the qualities of good algorithm. 12. Define Computational Complexity. 13. What is O notation?
1. Explain in detail the steps involved in Top down Design. 2. Write the verification condition of a program segments with a. Straight line statements b. Branches c. Loops
aa na va
a. S=1+(1/2)+(1/3)+.
3. Write a short notes on efficiency of an algorithm. 5. (a) Develop an algorithm to compute the sums for the first n terms
(b) Discuss in detail about the implementation of the algorithm. 6. (a) Write an algorithm to reverse the digits of a decimal number. (b) Write an algorithm to compute the Fibonacci series for n terms
n. co m
(16) (4) (6) (6) (16) (16) (8) (8) (8) (8)
PART B
1. Write a program in C to return the position of an element X in a List L. 2. (a) State & explain the algorithm to perform Radix Sort.
n. co m
H+1
(b) Write a Program in C to create an empty stack and to push an element into it.
4. (a) Write a c program to multiply two polynomials. (b) Write a c program to add two polynomials.
5. (a) Write an algorithm to convert infix to postfix expression and explain it with example (8) (b) Write an algorithm to evaluate a postfix expression and explain it with example (b) Write an algorithm for insertion and deletion operation in a circular queue (8) (8)
6. (a) Write an algorithm to check given expression contains balanced parenthesis or not.(8)
1. Explain the representation of priority queue 2. Compare the various hashing Techniques. 3. List out the steps involved in deleting a node from a binary search tree.
4. What is binary heap? 5. Define Binary search tree. 6. List out the various techniques of hashing 7. Define hash function. 8. Show that maximum number of nodes in a binary tree of height H is 2 9. Define hashing. 10. Define AVL tree. 1.
aa na va
PART A (2 Marks)
PART B
1. (a) Construct an expression tree for the expression A+(B-C)*D+(E*F) (b) Write a function to delete the minimum element from a binary heap it. 3. Explain in detail about Open Addressing 4. Explain in detail insertion into AVL Trees 5. Write a recursive algorithm for binary tree traversal with an example. (8) (8) (16) (16) (16) (16)
2. Write a program in C to create an empty binary search tree & search for an element X in
6. Write an algorithm for initializing the hash table and insertion in a separate chaining (16)
1. Mention the time complexities of merge sort & shell sort. 3. State the algorithmic technique used in Merge sort.
6. Develop pseudo code that will illustrate the process logic in insertion sort. 7. What is the best case time complexity of the quick sort algorithm? 8. Define external sorting.
9. State the algorithmic technique used in Increment Diminishing Sort. 10. Define sorting.
1. State & explain the algorithm to perform Heap sort. Also analyze the time complexity of
aa na va
of N distinct items?
5. What is the average number of comparisons used to heap sort a randomized permutation
PART B
the algorithm
n. co m
(16) (16)
2. Write a C program to perform Merge sort and analyze time complexity of the algorithm.
3. State & explain the algorithm to perform Quick sort. Also analyze the time complexity of the algorithm. (16) 4. State & explain the algorithm to perform Shell sort. Also analyze the time complexity of the algorithm. 5. State & Explain External sorting Algorithm Two Way Merge, Multiway Merge. (16) (16)
PART B
with example.
1. Formulate an algorithm to find the shortest path using Dijkstras algorithm and explain (16) (16) (8) (8) 2. Explain the minimum spanning tree algorithms with an example. 3. (a) Write short notes on Biconnectivity.
aa na va
4. 5.
Write and explain weighted and unweighted shortest path algorithm Explain the various applications of Depth First Search.
n. co m
-------------
(16) (16)