You are on page 1of 2

Name: ………………………………… Roll No: ………………………. the equivalent prefix form of above expression.

Where ^ is an exponent
operator.
ABES Institute of Technology, Ghaziabad b.
Differentiate between liner and binary search algorithm. Write a recursive
CO4
function to implement binary search.
Subject Code:BCS301: Subject Name :Data Structures
If the in order of a binary tree is B,I,D,A,C,G,E,H,F and its post order is
YEAR:2nd - Branch :Computer Science c. I,D,B,G,C H,F,E,A then draw a corresponding binary tree with neat and CO4
Model Question Paper (ODD SEMESTER 2023-24) clear steps from above assumption.
[Time: 3 Hours] [Total Marks: 100] d. What is Stack? Write a C program for linked list implementation of stack. CO2
Write algorithms of insertion sort. Implement the same on the following
COURSE OUTCOMES e. CO3
numbers;also calculate its time complexity. 13, 16, 10, 11, 4, 12,6,7
CO Statements
To Describe how arrays, linked lists, stacks, queues, trees, and graphs are SECTION-C
1
represented in memory, used by the algorithms and their typical applications. Q.3 Attempt any one Question of the following (10 x 1= 10) CO
2 To Discuss the computational efficiency of the sorting and searching algorithms. a. Write a C program to insert a node at kth position in single linked list. CO1
To Implement Trees and Graphs and perform various operations on these data Suppose a three dimensional array A is declared using A[1:10, -5:5, -10:5)
3
structures. (i) Find the length of each dimension and the number of elements in A
b. CO1
To Understand the concept of recursion, application of recursion and its (ii) Explain Row major order and Column Major Order in detail with
4
implementation and removal of recursion. explanation formula expression.
To Identify the alternative implementations of data structures with respect to their
5 Q.4 Attempt any one Question of the following (10 x 1= 10) CO
performance in solving a real-world problem.
a. Write a C program to implement stack using single linked list. CO1
Write an algorithm for converting infix expression into postfix expression.
SECTION-A b. Trace your algorithm for infix expression Q into its equivalent postfix CO2
Q.1 Attempt all Questions (2×10=20) CO expression P, Q: A + ( B * C – ( D / E ^ F) * G ) * H
a. How is the graph represented in memory? Explain with example CO5
b. Define Time-space tradeoff. CO1 Q.5 Attempt any one Question of the following (10 x 1= 10) CO
c. Differentiate Array and Linked List CO1 Write an algorithm for merge sort and apply on following elements
a. CO3
Rank the following typical bounds in increasing order of growth rate: 45,32,65,76,23,12,54,67,22,87.
d. CO1 (i) The keys 12, 17, 13, 2, 5, 43, 5 and 15 are inserted into an initially empty
O(log n), O(n4), O(1), O(n2 log n)
e. Write advantages of AVL tree over Binary Search Tree (BST) CO4 hash table of length 15 using open addressing with hash function h(k) = k mod
b. CO3
10 and linear probing. What is the resultant hash table?
f. What is tail recursion? Explain with a suitable example. CO2
(ii) Differentiate between linear and quadratic probing techniques.
g. Differentiate between binary search tree and a heap. CO4
In a complete binary tree if the number of nodes is 1000000. What will be the
h. CO4 Q.6 Attempt any one Question of the following (10 x 1= 10) CO
height of complete binary tree.
Use Dijkstra’s algorithm to find the shortest paths from source to all other
i. Write an algorithm for Breadth First Search (BFS) traversal of a graph. CO5 a. CO5
vertices inthe following graph.
j. What do you mean by stable and in place sorting CO3

SECTION-B
Q.2 Attempt any three Questions (10x3=30) CO
Evaluate the following postfix expression using stack.
a. CO2
2 3 9 * + 2 3 ^ - 6 2 / + , show the contents of each and every steps. also find
Write and explain the Floyd Warshall algorithm to find the all pair shortestpath.
Use the Floyd Warshall Algorithm to find the shortest path among all the
vertices in the graph.

b. CO5

Q.7 Attempt any one Question of the following (10 x 1= 10) CO


Discuss left skewed and right skewed binary tree. Construct an AVL tree by
a. inserting the following elements in the order of their occurrence: CO5
60, 2, 14, 22, 13, 111, 92, 86.
(i) Why does time complexity of search operation in B-Tree is better than
Binary Search Tree (BST)?
b. (ii) Insert the following keys into an initially empty B-tree of order 5 CO5
a, g, f, b, k, d, h, m, j, e, s, i, r, x, c, l, n, t, u, p
(iii) What will be the resultant B-Tree after deleting keys j, t and d in sequence?

You might also like