0% found this document useful (0 votes)
17 views7 pages

Assignment Questions S2

Assignment
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views7 pages

Assignment Questions S2

Assignment
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

School of Computing

Department of Computer Science and Engineering


Academic Year: 2024-2025

Programme: B.Tech Semester: SS2425 Slot: S2


Course Code: 10211CS102
Course Name: Data Structures

Faculty Name & TTS No.: Mrs.A.Lizy – TTS3757


Instructions :
➢ Each student is assigned a task with task number.
➢ Each task contains 5 questions. Each question from one unit.

S.No VTU No Name Task


1. VTU24506 NISHANTH G 1
2. KANNASANI NAVEEN KUMAR 2
VTU24626
REDDY
3. VTU24636 YUVANESWARI G 3
4. VATTALURI PAPANNAGARI 4
VTU24689
SREEJA REDDY
5. VTU24691 JAIKUMARI S 5
6. VTU24709 CHEPURI SAI KOUSHIK 6
7. VTU24767 SANJAY G 7
8. VTU24782 MOHAMMAD AFRID 1
9. VTU24785 SHASHANK 2
10. VTU24914 PILLI SAI MEDHAS 3
11. VTU25092 JAMMULA RITHIK REDDY 4
12. VTU25108 ACHUKATULU KAIF 5
13. VTU25342 CHAKKERA KARISHMA 6
14. VTU25363 PONAKALA JAYA PRAKASH 7
15. VTU25407 TARUN KUMAR M 1
16. VTU25458
KAMBHAM SAI PRAKASH 2
REDDY
17. VTU25461 P AKSHAYA 3
18. VTU25491 G GAYATHRI 4
19. AMMANABROLU BHANU 5
VTU25507
PRAKASH
20. RAMIREDDY LOHITH KUMAR 6
VTU25508
REDDY
21. VTU25579 ALLAM HARISH 7
22. MACHUPALLI MUNI DIVYA 1
VTU25581
REDDY
23. VTU25773 SIRIGIREDDY LAHARI 2
24. VTU25781 ROHIT RAJ 3
25. VTU25831 KANDHIKUNTA HEMRAJ 4
26. VTU25941 RAVILLA MURALI 5
27. VTU25959 SUHASH VISHWAKARMA 6
28. VTU25965 NIVEDHA S 7
29. VTU26028 B GOKULAVASAN 1
30. VTU26098 G VIJAY 2
31. VTU26126 YENDURI RAJA SRI 3
32. VTU26138 MODALA PRANEETH 4
33. VTU26154 ASHWANTH V 5
34. VTU26206 KAVI SHREE M 6
35. VTU26237 YADHAVAN P 7
36. VTU26244 ETTELA CHAKRADHARA SAI 1
37. VTU26299 MADDIREDDY SRISRI 2
38. VTU26399 YAMALA REVANTH 3
39. VTU26411 BATTINI AKASH 4
40. VTU26424
KADULLA VENKATA SAI 5
NIKITHA
41. VTU26443
VAKA VENKATA PAVAN TEJA 6
REDDY
42. VTU26445 KOLLAPUDI JASWANTH SURYA 7
43. ARAVITI LAKSHMI SAI 1
VTU26450
RESHMITHA
44. GANAPARTHI VENKATA NAGA 2
VTU26452
POOJA
45. VTU26461 GOGULA VENKATA SURESH 3
46. VTU26484 KALLE RAMNATH 4
47. PAPPURI 5
VTU26541 LOKAMANIKANTESWARA
REDDY
48. VTU26553 BATTULA SRIDHAR 6
49. VIJAYANAGARAM PRAJEETH 7
VTU26554
PREETHAM
50. VTU26600 PILLI DHARMATEJA 1
51. VTU26611 OSURI GANGA SAI 2
52. VTU26612 KOTTE JAGADEEP 3
53. VTU26658 MUPPIRI HIMAVANTH 4
54. VTU26664 KANDUKURI GIRISHWAR 5
55. VTU26665 DIVI CHANDRA SEKHAR AZAD 6
56. CHINTHALAPALLI SANJAY 7
VTU26669
REDDY
57. VTU26697 MANNURU JAGADEESH 1
58. VTU27240
DODDI SRI VENKATA 2
SIDDARDHA
59. VTU27248
PONNEKANTI KRISHNA 3
HARSHA
Assignment Questions

Task Q. Questions CO K-
No. No. Level
1 Explain Push and Pop operations of Stack. The following CO1 K2
operations are performed in a empty stack, Push(10), Push(20),
Pop, Push(30), Push(40), Pop, Pop, Push(50), Pop. What will be
the value at top of the stack?
2 A max-heap initially has five elements with the level-order traversal as CO2 K3
follows: 80, 65,57,49,34,27,12
Two elements '10' and '17' are inserted in the heap in that order. After
insertion of these elements in the heap, discuss the level-order traversal
of the heap.

3 Insert the following sequence of numbers into an initially empty CO3 K3


AVL tree: 13, 26, 5, 98, 45, 63, 72. Demonstrate the tree after each
1. insertion and highlight the rotations.
4 Illustrate the construction Minimum Spanning Tree using Prim’s CO4 K3
algorithm.

5 Write an algorithm for Merge sort. Show the intermediate steps CO5 K3
when the following numbers 398, 165, 183, 789, 274, 412, 907,
321, 823, and 120 are sorted using Merge sort.
1 Explain the Push and Pop operations of Stack. The sequence of CO1 K2
operations performed on stack are PUSH(40), PUSH(20), POP,
PUSH(60), PUSH(10), POP, POP, POP, PUSH(30), POP. What is the
sequence of the value popped out?

2 Write the Infix to Postfix algorithm. What is the postfix expression for CO2 K3
the infix expression (A / B) + [(C * D) /F + D] /E?

3 Consider a double hashing scheme in which the primary hash CO3 K3


function is h1(k)=k mod 12, and the secondary hash function is
h2(k)=1+(k mod 9). Assume that the table size is 12. What is the
address returned by probe 1 in the probe sequence (assume that
the probe sequence begins at probe 0) for key value k=85?
_______.
4 Find the shortest path for all the cities starting from city C by CO4 K3
applying Dijkstra’s algorithm.
2.

5 Discuss Partition algorithm for Quick sort. Sort the following CO5 K2
numbers 555, 222, 155, 622, 302, 421, 829 using Quick sort
algorithm.
3. 1 Intrepret the complexity of the following function. CO1 K2
(i)function()
{
int i, j, k;
for(i = n/2; i<=n; i++)
for(j= 1; j<=n/2; j++)
for(k=1;k<=n; k=k*2)
print(“Welcome”);
}

2 Consider the following list of numbers which are inserted in the CO2 K3
order into an initially empty binary search tree
{12,23,5,67,43,31,39,56,72} What is the post-order traversal
sequence of the resultant tree?

3 Explain the different Rotations in AVL tree with example. CO3 K3


4 (i) Construct a directed graph for the following specification of a CO4 K3
graph G.
V(G) = {1, 2, 3, 4, 5}
E(G) = {(1,2), (2,1), (2,4), (2,5), (3,2), (4,1), (4,3), (5,1),
(5,3), (5,4)}
(ii) Develop an adjacency matrix for the following graph.

5 Build an iterative algorithm for Binary search. CO5 K2


4. 1 Discuss the algorithm of postfix evaluation. What is the result of CO1 K2
evaluating the postfix expression

2 Construct binary max-heap tree for the following list of elements. 15, CO2 K3
17, 14, 9, 13, 26, 11. What is the array that represents a binary max-
heap?

3 A hash table contains 10 buckets and uses linear probing to resolve CO3 K3
collisions. The key values are integers and the hash function used
is key % 10. If the values 85,47,33,63,72,29 are inserted in the
table, in what location would the key value 142 be inserted?
4 Discuss the topological sorting algorithm and find the solution CO4 K3
to the following instance of Topological sorting problem.

5 Discuss a Partition algorithm for Quick sort. Sort the following CO5 K2
numbers 23, 49, 59, 31, 46, 82,34 using Quick sort algorithm.
5. 1 Interpret the complexity of the following functions CO1 K2

function ()
{
i=1;
s=1;
while (s <= n)
{
i++;
s = s+ i;
print(“welcome”);
}
}
2 Consider the following inorder and preorder traversal of a binary CO2 K3
tree
Pre order → ABCEIFJDGHKL
In order → EICFJBGDKHLA
What is the post order traversal of a binary tree?
3 Consider a hash table of size seven with starting index zero and a CO3 K3
hash function (6x+3) mod 4. Assuming the hash table is initially
empty. What is the content of the table when the sequence
1,3,8,10,5 are inserted into the table using closed hasing? (Note –
Use ‘-‘ to denote empty location in the table)
4 Give Breadth First Search Algorithm. Illustrate BFS graph CO4 K3
traversal for the following graph.

5 Discuss Insertion sort algorithm. Sort the following numbers 43, CO5 K2
45, 23, 50, 35, 46,92, 87,76 using Insertion sort algorithm.
1. The seven elements M,N,O,P,Q,R,S and T are pushed onto a CO1 K2
6. stack in reverse order (starting from T). The stack is popped five
times and each element is inserted into a queue. Two elements
are deleted from the queue and pushed back onto the stack.
One element is popped from the stack. What is the popped
item?
2 Consider the following list of numbers which are inserted in the CO2 K3
order into an initially empty binary search tree 100, 830, 645, 248,
435, 176, 989, 100, 439. What is the pre-order traversal sequence
of the resultant tree?
3 Explain B-Tree. Insert the following set of numbers in a B-Tree. CO3 K3
21,34,11,42,56,73,82.
4 Give Dijkstra’s algorithm and Illustrate Dijkstra’s algorithm for CO4 K3
the following graph.

5 Write an algorithm for Bubble sort and sort the following list of CO5 K3
numbers using Bubble sort algorithm.
74, 56, 65, 12,47, 81, 42, 59, 20
1. Consider the following postfix expression with single digit CO1 K2
operands: 9 2 3 * / 8 2 * + 5 8 * -. What is the top two elements of
the stack after the second * is evaluated?
2. The elements 32, 25, 80, 56, 78, 43, 67 are inserted one by one in CO2 K3
the given order into a max-heap. What is the array representation
of the resultant max-heap?
3. Show how many rotations are required during the construction CO3 K3
of an AVL tree if the following elements are to be added in the
given sequence. 75, 57, 43, 25, 36, 66, 78, 20, 28.
4. Discuss the topological sorting algorithm and find the solution CO4 K3
to the following instance of Topological sorting problem.
7.

.
5. Write an algorithm for Selection sort and sort the following list of CO5 K3
numbers using Selection sort algorithm.
54, 26, 93, 17,77, 31, 44, 55, 20

Course Handling Faculty Course Coordinator

You might also like