0% found this document useful (0 votes)
293 views4 pages

Data Structure Prvious Paper

This document is the question paper for a Data Structures exam consisting of multiple choice questions and subjective questions in three sections (A, B, C). It provides instructions to students to attempt all questions in the paper and assumes suitable data if necessary. The paper covers different topics in data structures including arrays, linked lists, stacks, queues, trees, graphs, searching and sorting algorithms. Students are asked to write programs in Python for problems related to these topics.

Uploaded by

flipkart6392
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)
293 views4 pages

Data Structure Prvious Paper

This document is the question paper for a Data Structures exam consisting of multiple choice questions and subjective questions in three sections (A, B, C). It provides instructions to students to attempt all questions in the paper and assumes suitable data if necessary. The paper covers different topics in data structures including arrays, linked lists, stacks, queues, trees, graphs, searching and sorting algorithms. Students are asked to write programs in Python for problems related to these topics.

Uploaded by

flipkart6392
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/ 4

Printed Page:- Subject Code:- ACSE0301

Roll. No:

NOIDA INSTITUTE OF ENGINEERING AND TECHNOLOGY, GREATER NOIDA


(An Autonomous Institute Affiliated to AKTU, Lucknow)
B,Tech.
SEM: III - THEORY EXAMINATION (2022 - 2023)
Subject: Data Structures
Time: 3 Hours Max. Marks: 100
General Instructions:
IMP: Verify that you have received the question paper with the correct course, code, branch etc.
1. This Question paper comprises of three Sections -A, B, & C. It consists of Multiple Choice Questions
(MCQ’s) & Subjective type questions.
2. Maximum marks for each question are indicated on right -hand side of each question.
3. Illustrate your answers with neat sketches wherever necessary.
4. Assume suitable data if necessary.
5. Preferably, write the answers in sequential order.
6. No sheet should be left blank. Any written material after a blank sheet will not be evaluated/checked.

SECTION A 20

1. Attempt all parts:-

1-a. What is the time complexity of insertion sort & selection sort? (CO1) 1

(a) O(logn), O(n)


(b) O(nlogn), O(1)
(c) O(n), O(n^2)
(d) O(n^2), O(n^2)

1-b. Given an array arr = {45,77,89,90,94,99,100} and key = 100; What are the values of 1
arr[mid] generated in the first and second iterations of binary search? (CO1)

(a) 90 and 99
(b) 90 and 100
(c) 89 and 94
(d) 94 and 99

1-c. A data structure in which elements can be inserted or deleted at/from both ends but not in the 1
middle is? (CO2)

(a) Queue

Page 1 of 4
(b) Circular queue
(c) Dequeue
(d) Priority queue

1-d. If the MAX_SIZE is the size of the array used in the implementation of circular queue, array 1
index starts with 0, front points to the first element in the queue, and rear points to the last
element in the queue. Which of the following condition specify that circular queue is FULL?
(CO2)

(a) Front=rear= -1
(b) Front=(rear+1)%MAX_SIZE
(c) Rear=front+1
(d) Rear=(front+1)%MAX_SIZE

1-e. Which of the following is true regarding polynomial addition? (CO3) 1

(a) exponents are added if coefficients are same


(b) coefficients are added if exponents are same
(c) only coefficients of all the nodes are added
(d) exponents and coefficients of all nodes are added

1-f. Linked lists are not suitable for the implementation of ___________ (CO3) 1

(a) Binary search


(b) Insertion sort
(c) Radix sort
(d) Polynomial manipulation

1-g. The preorder traversal sequence of a binary search tree is 30, 20, 10, 15, 25, 23, 39, 35, 42. 1
Which one of the following is the post-order traversal sequence of the same tree? (CO4)

(a) 10, 20, 15, 23, 25, 35, 42, 39, 30


(b) 15, 10, 25, 23, 20, 42, 35, 39, 30
(c) 15, 20, 10, 23, 25, 42, 35, 39, 30
(d) 15, 10, 23, 25, 20, 35, 42, 39, 30

1-h. Which of the following tree data structures is not a balanced binary tree? (CO4) 1

(a) AVL tree


(b) Red-black tree
(c) Splay tree
(d) B-tree

Page 2 of 4
1-i. For a given graph G having v vertices and e edges which is connected and has no cycles, 1
which of the following statements is true? (CO5)

(a) v = e
(b) v = e+1
(c) v + 1 = e
(d) v = e-1

1-j. What is the maximum number of edges present in a simple directed graph with 7 vertices if 1
there exists no cycles in the graph? (CO5)

(a) 21
(b) 7
(c) 6
(d) 49

2. Attempt all parts:-

2.a. What is hashing? (CO1) 2

2.b. Discuss infix, prefix and postfix expression. (CO2) 2

2.c. How many types of Linked List exist? (CO3) 2

2.d. What is Binary Search Tree? (CO4) 2

2.e. Differentiate between cyclic and acyclic graph. (CO5) 2

SECTION B 30

3. Answer any five of the following:-

3-a. What is data structure. Explain its types in detail. (CO1) 6

3-b. A hash table contains 7 buckets and uses linear probing to solve collision. The key values are 6
integers and the hash function used is key%7. Draw the table that, results after inserting in
the given order the following values:16, 8, 4, 13, 29, 11, 22. (CO1)

3-c. What will be the postfix expression for the infix expression A + B * (C + D) / F + D * E is 6
(CO2)

3-d. Write a Python code to find factorial of a number using recursion. (CO2) 6

3.e. Write a function in Python to reverse a singly linked list. (CO3) 6

3.f. Describe all Rotation in AVL tree. Construct AVL tree from the following nodes in given 6
order: B, C, G, E, F, D, A. (CO4)

3.g. Discuss the various operations of a file. (CO5) 6

SECTION C 50

Page 3 of 4
4. Answer any one of the following:-

4-a. What do you understand by divide and conquer algorithm? How this method is used in 10
merge sort? Write a program in Python to implement merge sort. (CO1)

4-b. What do you mean by Hashing Collision Resolution Technique (CRT)? Explain any three 10
CRTs with examples. (CO1)

5. Answer any one of the following:-

5-a. Write a program which performs insertion and deletion as per user choice in a DE queue. 10
(CO2)

5-b. Write a menu driven program in python to implement the various operations on a linear 10
queue. (CO2)

6. Answer any one of the following:-

6-a. What are doubly linked lists? Write a python program to create and display a doubly linked 10
list. (CO3)

6-b. Write short note on circular linked lists. Write a function to insert a node at front and rear 10
end in a circular linked list. Write down sequence of steps to be followed. (CO3)

7. Answer any one of the following:-

7-a. Define tree, binary tree, complete binary tree and full binary tree. Write algorithms or 10
function to obtain traversals of a binary tree in preorder, post-order and in-order. (CO4)

7-b. What is a height balanced Tree? Why height balancing of Tree is required? Create an AVL 10
Tree for the following elements: a, z, b, y, c, x, d, w, e, v, f (CO4)

8. Answer any one of the following:-

8-a. What is the diffrence between visiting a graph and traversing a graph? Explain any two 10
algorithm to find minimum cost spanning tree. (CO5)

8-b. Use Warshall's algorithm to find all pair shortest path for the given graph. (CO5) 10

Page 4 of 4

You might also like