0% found this document useful (0 votes)
138 views

SY BCA Data Structure Ques.Bank.

Uploaded by

tanveshpadyal3
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)
138 views

SY BCA Data Structure Ques.Bank.

Uploaded by

tanveshpadyal3
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/ 5

SY BCA DATA STRUCTURES Sem-III Question Bank

Q.1) 1 Marks Question .


A) Choose the correct option. [5 × 1 = 5]
a) _______ sorting algorithm can be used to sort a random linked list with minimum time complexity.
i) Insertion sort ii) Quick sort iii) Heap sort iv) Merge sort
b) _______ many queues are required to implement a stack?
i) 3 ii) 2 iii) 1 iv) 4
c) A data structure in which elements can be inserted or deleted at / from both the ends but not in the
middle is ________.
i) Queue ii) Circular Queue iii) Priority Queue iv) Dequeue
d) Find no. of binary tree with 3 nodes which when traversed in post order gives the sequence A, B, C is
_______.
i) 3 ii) 9 iii) 7 iv) 5
e) A vertex with degree one in a graph is called ________.
i) a leaf ii) pendant vertex iii) adjacency list iv) node
i) ______ case indicate the minimum time required for program excecution.
a) Best b) Average c) Worst d) Space ii) ______ algorithm design
technique is used in the quick sort algorithm.
a) Dynamic Programming b) Backtracking c) Divide and Conquer d) Greedy method
iii) Stack can be implemented using ____and ______.
a) Array and Binary Tree b) Linked list and Graph c) Array and Linked list d) Queue and Linked list
iv) Consider the following difinition in C programming language struct node
{
int data ;
struct node *next ;
}
typedef struct node NODE ; NODE *ptr; ______
C code is used to create new node.
a) ptr = (NODE*) molloc (NODE);
b) ptr = (NODE*) molloc (sizeof (NODE*));
c) ptr = (NODE*) molloc (sizeof(NODE));
d) ptr = (NODE) molloc (sizeof (NODE));
v) ____ type of traversal of Binary search tree outputs the value in sorted order.
a) Preorder b) Inorder c) Postorder d) Recursive
a) A queue follows_______ principle.
i) LIFO ii) FIFO iii) FILO iv) LFIO
b) ________is a postfix expression.
i) a+b–c ii) +ab iii) abc*+de–+ iv) a*b(c+d)
c) In worst case, the number of comparisions needed to search a singly linked list
of length n for given element is ________ i) log2 n ii) n/2 iii) log2 n–1 iv) n
d) The maximum number of children that binary tree node can have____ i) 0 ii) 1 iii) 2 iv) 3
e) _______is the number of edges present in a complete graph having n vertices.
i) (n*(n+1))/2 ii) (n*(n–1))/2 iii) n iv) n/2
a) ________ is the worst case time complexity of linear search.
i) O(1) ii) O(log n) iii) O(n) iv) O(n2 )
b) A stack follows ________ principal.
i) LIFO ii) FIFO iii) FFIO iv) LFIO
c) In singly linked list of integer, each node contains data and second field is ________
i) Integer ii) Pointer to integer iii) Pointer to node iv) Node
d) The total number of nodes in complete binary tree having depth 'd' is _________. i) 2*d ii) 2d iii) 2d –1
iv) 2d–1
e) ________ Data structure is used in DFS traversal
i) Array ii) Stack iii) Queue iv) Tree

B) Answer the following : [5 × 1 = 5]


a) Define Non-linear data structure.
b) List out 2 applications of linked list.
c) What is Pivot?
d) List out operations on Binary tree.
e) What is critical path?
i) Why do we need data structures?
ii) What is linear search? iii) Where can
stack data structure be used? iv) List out
operations on linked list.
v) How do you find the height of a node in a tree?
a) Define abstract type (ADT).
b) List types of linked list.
c) Which data structure is used in Depth First Search?
d) Give two applications of queue.
e) Define strictly binary tree.
a) Define Big oh(O) and Big omega ( ) notation
b) List the types of linked list.
c) Give two application of queue.
d) Define strictly binary tree.
e) Define complete graph. Q.2) 3 Marks Question .
a) Draw a Spanning tree of Graph G.
b) Define Binary tree and explain its advantages and disadvantages.
c) What is Recursion? Give one example.
d) Difference between singly linked list and doubly linked list.
e) Write a note on Multidimensional array.
f) What is Sparse Matrix? How it is represented using arrays?
a) Write a ‘C’ function to count leaf nodes in a binary tree.
b) Assuming int A[2] [3]={1, 2, 3, 4, 5, 6} is stored in a column major order with first element of A is at address
1000 and each integer occupying 2 bytes. What would be the address of the element A[1] [2]? c) Sort the
following numbers using Bubble sort method. 108, 3, 97, 65, 71, 23, 57, 93, 100 d) Write a ‘C’ function for
Binary search.
e) What is graph? Explain applications of graph.
f) Write a ‘C’ function to insert node at middle into singly linked list
a) Discuss different asymptotic notations.
b) Write C function to delete last node from singly linked list.
c) What is sparse matrix and how it is represented?
d) Differentiate between stack and queue.
e) Define Graph. Calculate in degree and out-degree for the following graph
f) Write short note on priority queue.
a) State the application of data structure.
b) What is sparse matrix? State it's advantages.
c) Write a node structure of doubly linked list.
d) What is a stack? List two applications of stack.
e) Define terms : i) node ii) Height of tree iii) degree of a node.

Q.3) 4 Marks Question .


a) Sort the following list using merge sort 2, 6, 8, 2, 3, 9, 1, 4, 9.
b) Write 'C' function for searching element in singly linked list.
c) What is Searching? Explain two techniques of it?
d) Write a 'C' function to insert node into Binary search tree.
e) What is Graph? Explain its types.
f) Explain representation of Queue with example.
g) Convert following expression infix to postfix form (Step - by - step) P/Q – R * S + T.
a) Write a ‘C’function to implement following operations on stack. i) Push ii) Pop
c) Write a ‘C’ function to search elements in Singly linked list.
d) What is Tree? Explain any three types of tree
e) Difference between Tree and Graph.
f) Write a note on Asymptotic notations.
g) What is Queue? Explain types of Queue.
a) Write an algorithm for insertion sort.
b) Define an array. Discuss memory represention of an array.
c) Write C function to reverse singly linked list.
d) What is queue? Discuss different queue operations.
e) Discuss different graph representations.
f) Convert the following expression into postfix using stack. ((A+B)*(C–D))/E
g) What is binary search tree? Show stepwise creation of binary search tree for the data 10, 20, 15, 5, 1, 7,
13
a) Define data structure and explain types of data structure.
b) Sort the following data using bubble sort method. 25, 37, 12, 48, 57, 33
c) What is a leaf node? Write a code to count leaf node of tree.
d) What is the result of evaluating the postfix expression AB-CD*/ with given values : A = 2 B = 10 C = 4 D = 1
e) Create binary search tree for the data. 10, 20, 15, 5, 1, 6, 13
f) Write algorithm for insertion sort Q.4)
5 Marks Question .
a) Construct a BST for following data. 11, 7, 15, 25, 18, 5, 12, 20
b) Define stack with its primitive operations.
c) Write 'C' function to delete node from beginning and end in Doubly linked list
e) Write 'C' function to insert and delete element in Circular Queue.
f) What is tree? Explain methods of Tree traversal.
g) Write a short note on Asymptotic notations
a) Construct BST for the following data. 11, 7, 15, 25, 18, 5, 12, 20
b) Write ‘C’ function for Enqueue and dequeue operation.
c) Explain quick sort algorithm with example.
d) Convert following expressions.
i) Convert Infix to Postfix 1) (A + B)* C + (D – E)/F + G 2) A–B/C * A/K–L ii)
Exaluate postfix expressions. 1) Postfix : 34 * 25* + 2) Postfix : 23 * 45 + *
e) Define Graph traversal. Explain with its techniques.
f) What is linked list? Explain representation of linked list in memory.
g) Explain Algorithm analysis in detail with example.
a) What is topological sort? Explain how to find topological ordering for graph using suitable example.
b) What is circular queue? Discuss operations on circular queue.
c) Write C function to search element using binary search method.
e) Write an algorithm for evaluating postfix expression and implement it on following expression
AB+CD – * [A=5, B=4, C=6, D=2]
f) Show pass wise sorting of data using bubble sort and discuss its time complexity. 25, 37, 12, 48, 57, 33
g) Write C function to insert and delete node in doubly linked list.
a) Write a C function to search element using binary search method.
b) Differentiate between stack and queue.
c) Show the stack contents and output while converting the following infix expression to postfix form
(A*B*C)/(F*G)–D
g) Write a C function to insert and delete node in doubly linked list.

You might also like