You are on page 1of 4

Date:20/11/2019 Enrolment No.

:___________________

RK UNIVERSITY
B.TECH./SEM-III/REGULAR/NOV.-2019

CE317: DATA STRUCTURES

Time: 09:00 AM TO 12:00 PM Total Marks: 100

Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Programmable calculator is not permissible.

SECTION – I

Q.1 (a) Select the most appropriate option: (Each of one mark) 06
1. What is the other name for a postfix expression?
a. Normal polish Notation
b. Reverse polish Notation
c. Warsaw notation
d. Infix notation
2. A variable P is called pointer if
a. P contains the address of an element in Data
b. P can store only memory addresses
c. P points to the address of 1st element in Data
d. P contains the Data and Address of Data
3. In which memory area our dynamically allocated variable will be
stored?
a. Stack
b. Hard Disk
c. Heap
d. None of above
4. At which position new nodes are added to Queue?
a. Front
b. Middle
c. back(rear)
d. None
5. Which one of the following is an application of Stack Data Structure?
a. Managing function calls
b. The stock span problem
c. Arithmetic expression evaluation
d. All of the above

Page 1 of 4
6. In Linked lists there are no NULL link in
a. Single linked list
b. doubly linked list
c. circular linked list
d. None of above

(b) Answer following questions: (Each of two mark) 10


1. Evaluate the following postfix expression: 752 +*411+/-
2. Explain the terms Input Restricted Queue and Output Restricted
Queue.
3. State the need of Dynamic Memory Allocation.
4. Give the array representation of queue data structure.
5. Give the pseudo code for traversing of linked list.

Q.2 (a) Construct stack that displays the following operation: PUSH, POP 06
and DISPLAY using function.
(b) Give the classification of linear and non-linear data structure. 05
Explain it in detail.
(c) Construct a program to find sum of all digits using recursion. 05
OR
Q.2 (a) Write Algorithm for linked list which performs following operations. 06
1) Insertion at Beginning and End.
2) Deletion from beginning and End.
(b) Construct an algorithm to convert an arithmetic expression from 05
Infix to Postfix.
(c) Elaborate D-Queue in detail with its operation. 05

Q.3 (a) Design a circular queue with its operation for insertion and deletion. 06
(b) Discuss Circular Linked List in detail with its basic operations. 06
(c) Discuss all four Memory Management Functions with their syntax. 06
Also give the comparison between malloc() and calloc().
OR
Q.3 (a) Explain queue data structure with its operations for insertion and 06
deletion along with their algorithms.
(b) Construct a program to read a one dimensional array, print sum of 06
all elements along with inputted array elements using Dynamic
Memory Allocation.
(c) Explain the three notations of stack. Also convert the following Infix 06
notation into Postfix using stack: A + (B * C - (D / E ^ F) * G) * H

Page 2 of 4
SECTION – II

Q.4 (a) Select the most appropriate option: (Each of one mark) 06
1. Which of the following data structure is linear data structure?
a. Trees
b. Graphs
c. Arrays
d. None of above
2. The depth of root node is
a. 0
b. 1
c. 2
d. 3
3. The complexity of binary search algorithm is
a. O(n)
b. O(n log n)
c. O(n2)
d. O(log n)
4. In which sorting, consecutive adjacent pairs of elements in the array
are compared with each other?
a. Bubble sort
b. Radix sort
c. Merge sort
d. Selection sort
5. Total number of nodes at the nth level of a binary tree can be given
as
a. 2n
b. 2n+1
c. 2n-1
d. n2
6. What is a hash table?
a. A structure that maps values to keys
b. A structure that maps keys to values
c. A structure used for storage
d. A structure used to implement stack and queue

(b) Answer following questions: (Each of two mark) 10


1. Classify Linear Search and Binary Search.
2. What is divide and conquer strategy?
3. Justify: Tree is a one graph.
4. Define Complete Binary Tree with example.
5. Define DFS and BFS with example.

Page 3 of 4
Q.5 (a) What is binary search trees? Explain the operations on binary 06
search trees.
(b) Write an algorithm of Quick sort technique. 05
(c) Define sorting. Which technique of searching an element in an array 05
would you prefer to use and in which situation?
OR
Q.5 (a) Explain the difference between insertion sort and selection sort with 06
an example. What is the time complexity of these algorithms? How?
(b) Write an algorithm of Merge sort technique. 05
(c) Write a program to create a binary search tree. 05

Q.6 (a) Explain any six graph terminologies. 06


(b) What is recursion? Write a program to implement binary search 06
using recursion.
(c) What do you mean by traversal in Tree? Explain Preorder, Inorder 06
and Postorder traversal techniques of binary tree with the help of
suitable example.
OR
Q.6 (a) Explain different types of hash functions with example. 06
(b) Write a program for insertion sort. 06
(c) Construct an AVL tree by inserting following elements in the given 06
order. 50 , 20 , 60 , 10 , 8 , 15 , 32 , 46 , 11 , 48

*************

Page 4 of 4

You might also like