SBI (SO) IT DSA Sample
SBI (SO) IT DSA Sample
Syllabus
1. Software Development: –
Data-Structures and Algorithms: 200 mcqs
(100 mcqs)
a) Dynamic size
b) Ease of insertion and deletion
c) Random access
d) Memory utilization
a) Stack
b) Queue
c) Linked List
d) Heap
1|P ag e
Answer: a) Stack
Explanation: In a stack, the last element added is the first one to be removed.
3. In a queue, the element is inserted at the ___ and deleted from the ___.
a) Front, rear
b) Rear, front
c) Top, bottom
d) Left, right
4. Which of the following traversal algorithms is used in Depth First Search (DFS)?
a) Pre-order
b) In-order
c) Post-order
d) All of the above
Answer: a) Pre-order
Explanation: DFS can use pre-order traversal to explore nodes, especially in tree-
based structures.
a) O(n)
b) O(log n)
c) O(n log n)
d) O(n²)
Answer: b) O(log n)
Explanation: Binary search divides the array in half, reducing the search space
logarithmically.
2|P ag e
57. Which of the following operations is performed in constant time O(1) in a circular
queue?
58. Which data structure is used in implementing the Depth-First Search (DFS)
algorithm?
a) Queue
b) Stack
c) Heap
d) Tree
Answer: b) Stack
Explanation: DFS uses a stack (either explicitly or implicitly through recursion) to
explore nodes in depth-first order.
59. Which of the following binary tree traversal algorithms visits the root node first?
a) Inorder
b) Postorder
c) Preorder
d) Level order
Answer: c) Preorder
Explanation: Preorder traversal visits the root node first, followed by the left and
right subtrees.
18 | P a g e
Answer: a) Left rotation
Explanation: A left rotation is performed when a node is inserted into the right
subtree of the right child, balancing the AVL tree.
99. Which of the following data structures is used to model relationships between
objects?
a) Tree
b) Graph
c) Queue
d) Stack
Answer: b) Graph
Explanation: A graph models relationships between objects, where vertices
represent objects and edges represent relationships.
31 | P a g e
Searching and Sorting Algorithms along with their Space-Time
Complexities(100 mcqs)
1. What is the time complexity of linear search in an unsorted array of 'n' elements?
a) O(log n)
b) O(n)
c) O(n log n)
d) O(1)
Answer: b) O(n)
Explanation: Linear search checks each element sequentially, so in the worst
case, it takes O(n) time to find the target element.
2. Which of the following algorithms has the best average-case time complexity for
sorting?
a) Bubble Sort
b) Insertion Sort
c) Quick Sort
d) Selection Sort
a) O(1)
b) O(log n)
c) O(n)
d) O(n log n)
Answer: c) O(n)
Explanation: Merge Sort requires O(n) extra space for storing the temporary
arrays used during the merging process.
32 | P a g e
13. Which sorting algorithm is particularly efficient for sorting linked lists?
a) Merge Sort
b) Quick Sort
c) Bubble Sort
d) Selection Sort
a) Heap Sort
b) Radix Sort
c) Merge Sort
d) Quick Sort
a) O(n)
b) O(n log n)
c) O(n^2)
d) O(log n)
Answer: c) O(n^2)
Explanation: Selection Sort repeatedly selects the smallest element, and its time
complexity is O(n^2).
36 | P a g e
46. Which of the following is a characteristic of Bubble Sort?
a) It is not adaptive.
b) It is a divide-and-conquer algorithm.
c) It repeatedly steps through the list.
d) It has a space complexity of O(n).
a) O(n^2)
b) O(n log n)
c) O(n)
d) O(log n)
47 | P a g e
97. Which of the following algorithms is best suited for sorting linked lists?
a) Quick Sort
b) Merge Sort
c) Heap Sort
d) Bubble Sort
98. Which sorting algorithm divides the input into two halves, sorts them, and then
merges the sorted halves?
a) Quick Sort
b) Merge Sort
c) Heap Sort
d) Insertion Sort
64 | P a g e
100. What is the primary disadvantage of using Merge Sort?
65 | P a g e