0% found this document useful (0 votes)
57 views3 pages

(Backlog) Csen 2001

This document contains a practice exam for the course "Data Structure and Basic Algorithms". It has multiple choice and long answer questions testing knowledge of data structures like stacks, queues, linked lists, trees, and algorithms like searching, sorting. The exam is divided into 5 sections covering topics such as abstract data types, sparse matrices, recursion, binary search trees, and sorting algorithms like merge sort. Students are required to answer all multiple choice questions and questions from 5 out of the 6 long answer sections.

Uploaded by

Vikash Kumar
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)
57 views3 pages

(Backlog) Csen 2001

This document contains a practice exam for the course "Data Structure and Basic Algorithms". It has multiple choice and long answer questions testing knowledge of data structures like stacks, queues, linked lists, trees, and algorithms like searching, sorting. The exam is divided into 5 sections covering topics such as abstract data types, sparse matrices, recursion, binary search trees, and sorting algorithms like merge sort. Students are required to answer all multiple choice questions and questions from 5 out of the 6 long answer sections.

Uploaded by

Vikash Kumar
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/ 3

B.

TECH/AEIE/IT/3RD SEM/CSEN 2001 (BACKLOG)/2020


B.TECH/AEIE/IT/3RD SEM/CSEN 2001 (BACKLOG)/2020

DATA STRUCTURE AND BASIC ALGORITHMS


(CSEN 2001)
Time Allotted : 3 hrs Full Marks : 70
Figures out of the right margin indicate full marks.
Candidates are required to answer Group A and
any 5 (five) from Group B to E, taking at least one from each group.
Candidates are required to give answer in their own words as far as practicable.

Group – A
(Multiple Choice Type Questions)

1. Choose the correct alternative for the following: 10 × 1 = 10


(i) In a stack, if a user tries to remove an element from an empty stack it is called _________
(a) Underflow (b) Empty collection
(c) Overflow (d) Garbage Collection.
(ii) Consider the usual algorithm for determining whether a sequence of
parentheses is balanced. The maximum number of parentheses that appear on
the stack AT ANY ONE TIME when the algorithm analyzes: (()(())(()))?
(a) 1 (b) 2 (c) 3 (d) 4 or more.
(iii) What data structure would you mostly likely to see in non recursive
implementation of a recursive algorithm?
(a) Linked List (b) Stack (c) Queue (d) Tree.
(iv) The data structure required for Breadth First Traversal on a graph is?
(a) Stack (b) Array (c) Queue (d) Tree.
(v) A normal queue, if implemented using an array of size MAX_SIZE, gets full when?
(a) Rear = MAX_SIZE – 1 (b) Front = (rear + 1)mod MAX_SIZE
(c) Front = rear + 1 (d) Rear = front.
(vi) In linked list each node contains a minimum of two fields. One field is data field
to store the data. Which of the following is the second field?
(a) Pointer to character (b) Pointer to integer
(c) Pointer to node (d) Node.
(vii) What are the indices of the children for a node with index 'w' of a complete
binary in an array representation when the index of the root node is 1?
(a) 2w and 2w+1 (b) 2+w and 2-w
(c) w+1/2 and w/2 (d) w-1/2 and w+1/2.

CSEN 2001 1
B.TECH/AEIE/IT/3RD SEM/CSEN 2001 (BACKLOG)/2020
(viii) What is the possible number of binary trees that can be created with 3 nodes,
giving the sequence N, M, L when traversed in post-order.
(a) 15 (b) 3 (c) 5 (d) 8.
(ix) Which of the following is false about a binary search tree?
(a) The left child is always lesser than its parent
(b) The right child is always greater than its parent
(c) The left and right sub-trees should also be binary search trees
(d) In order sequence gives decreasing order of elements.
(x) What is the number of edges present in a complete graph having n vertices?
(a) (n*(n+1))/2 (b) (n*(n-1))/2
(c) n (d) Information given is insufficient.

Group – B
2. (a) Define abstract data type with an example.
(b) Compare between array and linked list.
(c) Define Big-O, Omega and Theta notations.
3+ 3 + (3 × 2) = 12

3. (a) Explain an efficient way of storing a sparse matrix in memory. Write an


algorithm to find the transpose of a sparse matrix.
(b) Write down the algorithm to delete the first node of a singly linked list.
(c) Compare between singly linked list and circular linked list.
(2 + 3) + 4 + 3 = 12

Group – C
4. (a) Write an algorithm to push an element in a given stack.
(b) Evaluate the following postfix expression:
7 9 2 + * 8 15 3 / - *
(c) Write an algorithm to convert infix to postfix expression.
3 + 3 + 6 = 12

5. (a) Compare between linear queue and circular queue.


(b) Write a recursive function for calculating nth fibonacci number. Compute the
time and space requirement of the above function by drawing the recursion tree
for the value of n as 5.
(c) What is tail recursion?
3 + (3 + 4) + 2 = 12

CSEN 2001 2
B.TECH/AEIE/IT/3RD SEM/CSEN 2001 (BACKLOG)/2020
Group – D
6. What is a Binary Search Tree (BST)? Draw a BST for the following sequence of numbers
55, 16, 76, 33, 88, 115, 98, 39, 44, 56, 69, 44
Traverse the above constructed tree in Preorder, Inorder and Postorder.

(1 + 5 + (3 × 2)) = 12

7. (a) What is an expression tree? Represent the following expression using a tree.
E= (a-b) / ((c*d)+e).
(b) Consider the graph in the figure below. Find out the output of BFS and DFS
traversal (consider 1 to be start node). Show every step with explanation using
corresponding data structure.

(1 + 3) + (4 + 4) = 12

Group – E
8. (a) Consider the list of numbers :- 78, 66, 52, 46, 44, 40, 36, 33, 29, 19, 11, 10, 9, 6
Assume your target is 9 and the start index (lo) is 0 and the end index (hi) is 13
at the beginning. You are applying Binary Search algorithm to find it.
(i) What will be the value of hi and lo when you find your target?
(ii) What will be the exact number of key comparisons to find your target?
Show every step.
(b) Bubble sort algorithm is inefficient because it continues execution even after an
array is sorted by performing unnecessary comparisons. Therefore, the number of
comparisons in the best and worst cases are the same. Modify the algorithm in
such a fashion that it will not make the next pass when the array is already sorted.
6 + 6 = 12

9. (a) Sort the following sequence of keys using merge sort.


26, 17, 11, 81, 19, 22, 73, 44, 65
Deduce the average case time complexity of merge sort
(b) Compare between binary search and interpolation search.
(c) What is hashing?
(4 + 4) + 2 + 2 = 12

Department &
Submission Link
Section
IT https://classroom.google.com/c/Mjk4MjAwODI4NjQ0/a/Mjk4MjEwNjI0NTMy/details

CSEN 2001 3

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy