1616149724CSE_2yr_2018-22_Data Structure and Programming
1616149724CSE_2yr_2018-22_Data Structure and Programming
Parts i) and ii) of each question are compulsory and each part carries 2 marks. Parts iii), iv) and
v) carry 8 marks each and the student may attempt any 2 parts.
Q1.
i) Which data structure is used to perform recursion?
a) Stack b) Linked list c) Array d) Queue
(2 marks)
ii) A procedure that calls itself is called
a) Illegal call b) Reverse polish c) Recursive d) None of the above
(2 marks)
iii)Describe data structure? What are the various operations of Data Structures?
(8 marks)
iv)Write short note on:
a) Dynamic memory allocation b) Abstract data types c) Recursion in C d) Two - d array in C
(8 marks)
v)Differentiate between Union and Structure.
(8 marks)
Q2.
i) What data structure would you mostly likely see in a non-recursive implementation of a recursive
algorithm?
a) Stack b) Linked list c) Queue d) Trees
(2 marks)
ii) Stack data structure cannot be used for
a) Implementation of Recursive Function b) Allocation resources and scheduling
c) Reversing string d) Evaluation of string in Postfix form
(2 marks)
iii) Explain steps to convert infix notation into reverse polish notation (postfix) ?Explain with the
help of an example.
(8 marks)
Page 1 of 3
iv) Explain Stack ADT. Implement Stack using array.
(8 marks)
v) Differentiate queue and stack. Show implementation of Queue ADT using array.
(8 marks)
Q3.
(8 marks)
Q4.
i) Which of the following algorithm is not stable?
a) Bubble sort b) Quick sort c) Merge sort d) Insertion sort
(2 marks)
ii) -------- is the method used by card sorter.
a) Radix sort b) Insertion c) Heap d) Quick
(2 marks)
iii) Explain an algorithm for searching an element using binary search.
(8 marks)
iv) Define Binary heap? Discuss Property of binary heap with the help of example.
(8 marks)
v) Write linear search algorithm to search an element in a list of N numbers.
(8 marks)
Page 2 of 3
Q5.
i) Which data structure is used for depth first traversal of a graph?
a) queue b) stack c) list d) none of the above
(2 marks)
ii) All Graphs have unique representation on paper.
a) True b) False
(2 marks)
iii) Explain BFS graphs traversal algorithms with suitable example.
(8 marks)
iv)Discuss following with reference to graphs.
a) Directed graph b) Undirected graph
(8 marks)
v)Explain Kruskal algorithm with example.
(8 marks)
Page 3 of 3