RTUComputer ScienceYr 2023 · Sem 3

Data Structures

22 questions

Q12 marks

How stack is represented using dynamic array? Explain with example.

Show Answer
Q32 marks

Elaborate the disadvantages of Linked List over Arrays.

Show Answer
Q42 marks

Justify how circular queue is different from normal queue.

Show Answer
Q52 marks

Differentiate between sequential and binary search.

Show Answer
Q62 marks

Illustrate different traversal techniques used in binary search tree.

Show Answer
Q72 marks

List out best, average and worst case complexity of merge and quick sort.

Show Answer
Q82 marks

Examine the relationship between number of nodes and height of AVL tree.

Show Answer
Q92 marks

Determine advantages and disadvantages of adjacent matrix representation for graphs.

Show Answer
Q114 marks

Convert the following infix expression into postfix expression:

A + B - (C + D) / E * F - (G + H) / I

Show Answer
Q124 marks

Consider the preorder of a BST: 20, 5, 3, 4, 10, 15, 30, 25, 40

What will be the post-order?

Show Answer
Q134 marks

Write an algorithm to enqueue and dequeue an element in a queue.

Show Answer
Q144 marks

Sort the following elements using quick sort: 28, 5, 16, 36, 11, 19, 25

Show Answer
Q164 marks

What is a MST? Differentiate between Kruskal and Prim's algorithm with their time complexity.

Show Answer
Q174 marks

Explain the algorithm for deleting an element from doubly linked list.

Show Answer
Q1810 marks

Examine each step involved with Radix sort to sort the given array - 329, 457, 657, 839, 436, 720, 355

Show Answer
Q1910 marks

Write a C program to add a node with data 'X' before a node with data 'Y' in a singly linked list.

Show Answer
Q2010 marks

Create an AVL tree using the following nodes 10, 6, 11, 12, 1, 7, 0, 2, 3. What will be the resulting AVL tree if node 12 is deleted from above AVL tree?

Show Answer
Q2110 marks

Consider the following graph -

0123456263857911142

Find the minimum spanning tree using Prim's algorithm.

Show Answer
Q2210 marks

(a) Write a recursive program for towers of Hanoi.

(b) What is a stack? Calculate the following expression - 8 2 3 ^ / 2 3 + 5 1 -

Show Answer