Question 2: [Stack/Queue/Linked-list -11 Marks]
2.1 Define a Queue, mention various operations on Queue [3]
2.2 Define a graph. How is it different from a Tree ?[3]
2.3 Explain the concept of singly-linked list with example [3]
2.4 The following Five Soccer Players 'names3: Pogba, Messi, Mane, Ronalda and Salah were
pushed into a stack in that order. The stack is then popped out four names and each name is
inserted in a queue. The two names are deleted from the queue and pushed back on the
stack. Now one name is then popped from the stack. What are names of players left in the
stack? [2]
Question 3: [BST-15 Marks]
3.1 Construct a Binary Search Tree (BST)for the following elements: 12, 76, 51, 96, 200, 100 82. Using
POSTORDERTraversal technique [7]
3.2 Mention any two operations on BST[2]
3.3 Use Insertion sort algorithm to sort the array below: 4,3,2,10,12,1,5,6. Show content for each step
[6]
Question 4: [AVLTrees -14 Marks]
1.1 Study the AVL tree below and write down any two possible insertions sequence that produce
the following result: [2]
1.2 To an empty AVL tree. Which of the insertions in a) achieve the balance without any
rotation?[2]
1.3 Is the AVL in a) is balance? state your reason with support the balancing factors involved [2]
1.4 Name and briefly explain the two types of AVL tree rotations [4]
1.5 Differentiate between BSTand AVL tree (2)
3