Skip to content
Previous Year Question Paper

CSIT-303 - Data Structure (DS)

November 2022CSITSEMESTER-3
November 2022
Max Marks:
Duration:
Q.1
a)Unit 2

What are the merits and demerits of array? Given two arrays of integers in ascending order, develop an algorithm to merge these arrays to form a third array sorted in ascending order.

b)Unit 2

Given a 2D array A[-100, 50:-5, 50]. Find the address of element A[99, 49] considering the base address 10 and each element requires 4 bytes for storage. Follow row major order.

Q.2
a)Unit 2

Write an algorithm of Heap sort. Sort the given sequence with the help of heap sort: 50, 48, 35, 44, 80, 70, 10, 55, 11, 85

b)Unit 1

How do you find the complexity of an algorithm? What is the relation between the time and space complexities of an algorithm? Justify your answer with an example.

Q.3
a)Unit 2

Differentiate between linear search and binary search techniques. Write a C program to search an element in an array using binary search. Also write its time complexity.

b)Unit 4

What are the advantages of linked list over array? Write an algorithm/C code to insert a node at the end of a singly linked list.

Q.4
a)Unit 4

Write an algorithm/C program that reverses the order of all the elements in a singly linked list.

b)Unit 3

Write an algorithm for the evaluation of a postfix expressions.

Q.5
a)Unit 3

Convert the following infix expression to prefix and postfix expression using stack: ((2 + 3) * 4 + (5 * (6 + 7) * 9))

b)Unit 4

Show the addition of given polynomials using linked list: P = 3x^2 + 2x + 7 Q = 5x^3 + 2x^2 + x

Q.6
a)Unit 5

What is Tree data structure? What are the different types of tree?

b)Unit 5

Show that the maximum number of nodes in a binary tree of height h is 2^(h+1) - 1

Q.7
a)Unit 3

What do you mean by stack? What do you mean by overflow and underflow condition? Write an algorithm/C function for push and pop operations.

b)Unit 5

Explain DFS and BFS algorithm supporting with the example.

Q.8
a)Unit 5

Construct a binary tree for given Sequence. IN ORDER: 9, 12, 14, 17, 23, 19, 50, 54, 67, 72, 76 POST ORDER: 9, 14, 12, 19, 23, 17, 67, 54, 76, 72, 50

b)Unit 4

Explain Garbage collection and compaction.