Tutorial Questions (Final)
Tutorial Questions (Final)
Insert a new-node 100 at the beginning of the single linked list. CO2 / K2,
1 Input: 22-> 77-> 55-> 88->
K3
Output: 10->22-> 77-> 55-> 88->
Insert a new-node 110 at the end of the single linked list. CO2 / K2,
2 Input: 22-> 77-> 55-> 88->
K3
Output: 22-> 77-> 55-> 88-> 110->
Insert a new-node 101 at the position 4 of the list. CO2 / K2,
3 Input: 55-> 77-> 88-> 99->22->
K3
Output: 55-> 77->8 8->101-> 99->22->
Delete a node at the beginning of the single linked list. CO2 / K2,
4 Input: 22-> 55-> 77-> 11->99->
K3
Output: 55-> 77->1 1->99->
Delete a node at the end of the single linked list.
CO2 / K2,
5 Input: 11->33-> 44-> 22->99->
K3
Output: 11-> 33-> 44-> 22->
Delete a node at the position 4 of the single linked list.
CO2 / K2,
6 Input: 22-> 77-> 99-> 22->55->77->
K3
Output: 22-> 77-> 99 ->55->77->
Find the difference between Maximum and Minimum elements in
the SLL. CO2 / K2,
7
Input 56-> 99-> 66-> 22-> 33-> K3
Output: Difference = 77
Search the key element =222 available in the SLL.
CO2 / K2,
8 Input : 55-> 99-> 66-> 22-> 33->
K3
Output : “NOT FOUND”
Perform the following operations using stack. Assume the size of
the stack is 5 and having a value of 22, 55, 33, 66, 88 in the stack
CO2 / K3,
9 from 0 position to size-1. Now perform the following operations:
K5
1) Invert the elements in the stack, 2) Pop(), 3) Pop(), 3) Pop(), 4)
Push(90), 5) Push(36), 6) Push(11), 7) Push(88), 8) Pop(), 9)
Pop(). Draw the diagram of stack and illustrate the above
operations and identify where the top is?.
Convert the following infix expression in to post fix expression. B - CO2 / K3,
10 ( C/D + (E % F* G ) / H) * J
K5
Evaluate the given postfix expression. a) 9 3 8 4 /*+ b) 6 2 + 6 3 /*
Illustrate the queue operation using following function calls of size
= 5. Enqueue(21), Enqueue(67), Enqueue(89), Dequeue(), CO2 / K3,
11 Enqueue(15), Enqueue(30), Enqueue(52), Dnqueue(), Dequeue(),
K5
Dequeue(),Dequeue().
Identify the given expression is balanced or not. [9 *(k+8 -{ 6 +e} + CO2 / K3,
12 77) / 100 ]
K5
Identify the given expression is balanced or not. (((a*b) +[u/2] –d)
Convert the following infix expression in to post fix expression.
(((a*b) + (c/d)) – (e*f)) CO2 / K3,
13
Evaluate the given postfix expression. a) 5 6 7 * 8 + - 2 / b) 3 7 * K5
48/+93*-
1. CO3/ K3
2. CO3 / K3
4. Draw the concept map of Binary Tree for the expression CO4 / K3
A*B/C+E/F*G+K–X*Y
Draw the concept map of In-order, Pre-order and Post-
order traversal of the given tree
5. CO3/ K3
6. CO3/ K3
11. Construct quick sort for the initial key set 4, 33, 74,10, CO3 / K3
67,58,94,36,100,87,79
Build the merge sort for the following elements
12. CO3 / K3
12,56,32,45,18,54.67,33
Draw the concept map of partitioning in quick sort, we will
now try to write an algorithm for it, which is as follows.
1. CO5 / K2
2. CO5 / K2
4. CO5 / K3
5. CO5 / K2
6. CO5 / K2
Construct the minimum spanning tree (MST) for the given
graph using Prim’s Algorithm
7. CO5 / K3
8. CO5 / K3
9. CO5 / K3
10. CO5 / K3
11. CO5 / K3
Consider the following graph & construct BFS
12. CO5 / K3
13. CO5 / K3
14. CO5 / K3