Data Structures and Algorithms
Community
Data Structures and Algorithms
2083 Boards
Section A
Answer any two questions.
1
Differentiate between singly, doubly and circular linked list. How do you insert a new element at the beginning at the specified position and at the end of doubly linked list? Explain.
10
Connect with us on Discord to become a contributor.
2
Is bubble sort internal sort or external sort? Give reason. Apply Quick sort on the data set {12, 7, 9, 24, 8, 2, -8, 11, 4, 3 , 14, 5, 6, -6} to keep them in ascending order.
10
Connect with us on Discord to become a contributor.
3
When does the binary search algorithm perform the worst case? Assume the size of hash table be 7 and the hash function as h(k) = k MOD 7. Now resolve the collisions using Linear probing, Quadratic probing and Double hashing while inserting the elements 17, 8, 24, 11, 15.
10
Connect with us on Discord to become a contributor.
Section B
Answer any eight questions.
4
Differentiate between ADT and data structure. Why do we always do worst case analysis of an algorithm? Justify.
5
Connect with us on Discord to become a contributor.
5
Convert X + Y x Z - ( A / B ) to postfix using stack.
5
Connect with us on Discord to become a contributor.
6
Assume a circular queue of size 5 and then enqueue 4, 9, 5 and then dequeue two elements and enqueue 11.
5
Connect with us on Discord to become a contributor.
7
When do we prefer tail recursion? Demonstrate a program to find the factorial value of given positive integer using tail recursion.
5
Connect with us on Discord to become a contributor.
8
How do you measure efficiency of a sorting algorithm? How do you create a node for circular linked list?
5
Connect with us on Discord to become a contributor.
9
What is the problem with binary search tree? List the primitive operations on queue.
5
Connect with us on Discord to become a contributor.
10
Create an AVL tree for the data {35, 15, 5, 20, 25}.
5
Connect with us on Discord to become a contributor.
11
Find the minimum spanning tree of following graph using Prims algorthm.
5
Connect with us on Discord to become a contributor.
12
Write the algorithm for merge sort.
5
Connect with us on Discord to become a contributor.