The number of swapping needed to sort numbers 8,22,7,9,31,19,5,13 in ascending order using bubble sort is
Official theoretical question paper for Data Structure Algorithms (PCC-CS301) conducted by Maulana Abul Kalam Azad University of Technology. All questions from Groups A, B, and C are reproduced below with marks weightings.
The number of swapping needed to sort numbers 8,22,7,9,31,19,5,13 in ascending order using bubble sort is
Binary search uses
The following sequence of operations is performed on a stack: push(1), push(2), pop, push(1), pop, pop, push(2), pop. The sequence of popped out values are
The postfix expression for * + a b - c d is
Adjacency matrix for a digraph is
Which of the following is a hash function?
Linked list is not suitable data structure for which one of the following problems?
Number of all possible binary trees with 4 nodes is
If the inorder and preorder traversal of a binary tree are D,B,F,E,G,H,A,C and A,B,D,E,F,G,H,C respectively then, the postorder traversal of that tree is
The heap represented by an array) constructed from the list of numbers 30,10,80,60,15,55,17 is
In array representation of Binary tree, if the index number of a child node is 6 then the index number of it's parent node is
BFS constructs
Define sorting.
What is a stable sorting? What is In-Place sorting?
Write the Pseudocode for Merge sort implementation. What is its time complexity?
If the existing array is sorted and you want to insert a new element in the list without disrupting the sortedness then which sorting technique you should use? Why?
What is Hashing?
Show the stages in growth of an order -4B- Tree when the following keys are inserted in the order given:- 84 82 29 97 61 10 45 28 49 70 86 68 19 55 22 11 55 77 16
How does an AVL tree differ from a binary search tree? Insert the following keys in the order given below to build an AVL tree:- 8 12 9 11 7 6 66 2 1 44
Clearly mention different rotation used and balance factor of each node.
Write the Prim's algorithm for finding MST from a graph.
Write short notes on any three of the following
Radix Sort.
Index sequential File Organization.
DFS in graph.
Threaded binary tree.
Differentiate between Linear and Non Linear data structures? Give two examples of each.
Write an algorithm to find the largest and smallest element in a single linear list.
Suppose one 2-D array is initialized as int a [5] [7]; Base address is 4000. Find the location of element a [2] [4] in row major form and column major form.
Define Sparse Matrix.
Prove that the maximum no. of nodes in a binary tree of depth k is 2^k - 1.
What are the characteristics of algorithm?
Draw a minimum heap tree from the list below: 12,11,7,3,10,-5,0,9,2 Now do the heap sort operation over the heap tree.
Represent the given polynomial using a link list.
Write the pseudo code / C code for adding two polynomials (already given by user, no need to take input). Also comment on the complexity of your algorithm.
Write the Pseudocode or C code to implement Tower of Hanoi problem. Also find the complexity of your procedure.
Insert the following numbers into a binary search tree in the order that they are given and draw the resulting tree. 87;36;22;15;56;85;48;91;72;6. Delete 48 and draw the resulting tree.
Write an algorithm to insert an element into binary search tree.
Write a program to implement the following operations on a singly linked list: (i) Insert a node at the beginning (ii) Insert a node at the end (iii) Insert a node after a given node (iv) Delete a node from the beginning (v) Delete a node from the end (vi) Delete a node after a given node (vii) Display the list (viii) Search for a given element. The program should be menu driven.
Write a program to implement the following operations on a doubly linked list: (i) Insert a node at the beginning (ii) Insert a node at the end (iii) Insert a node after a given node (iv) Delete a node from the beginning (v) Delete a node from the end (vi) Delete a node after a given node (vii) Display the list (viii) Search for a given element. The program should be menu driven.
Write a program to implement the following operations on a circular linked list: (i) Insert a node at the beginning (ii) Insert a node at the end (iii) Insert a node after a given node (iv) Delete a node from the beginning (v) Delete a node from the end (vi) Delete a node after a given node (vii) Display the list (viii) Search for a given element. The program should be menu driven.