Explore topic-wise MCQs in Data Structures Mcqs.

This section includes 125 Mcqs, each offering curated multiple-choice questions to sharpen your Data Structures Mcqs knowledge and support exam preparation. Choose a topic below to get started.

51.

In , search start at the beginning of the list and check every element in the list.

A. Linear search
B. Binary search
C. Hash Search
D. Binary Tree search
Answer» B. Binary search
52.

It is estimated that around __________ of all CPU cycles are used to sort data?

A. 10 per cent
B. 50 per cent
C. 30 per cent
D. 25 per cent
Answer» E.
53.

Library sort was first published in___________.

A. 2004
B. 2001
C. 2008
D. 1998
Answer» B. 2001
54.

Hashing collision resolution techniques are:

A. Huffman coding, linear hashing
B. Bucket addressing, Huffman coding
C. Chaining, Huffman coding
D. Chaining, Bucket addressing
Answer» E.
55.

Heap allocation is required for languages

A. That support recursion
B. That use dynamic scope rules
C. That support dynamic data structure
D. All of above
Answer» D. All of above
56.

How can you improve the best case efficiency in bubble sort? (The input is already sorted)

A. A
B. B
C. C
D. D
Answer» D. D
57.

An adaptive sorting algorithm

A. Adapts to new computers.
B. Takes advantage of already sorted elements.
C. Takes input which is already sorted.
D. None of the above.
Answer» C. Takes input which is already sorted.
58.

An array sorted in the reverse order is the __________ case input.

A. Worst
B. Best
C. Somewhat bad
D. None of the above
Answer» B. Best
59.

As part of the maintenance work, you are entrusted with the work of rearranging the library books in a shelf in proper order, at the end of each day. The ideal choice will be

A. Heap sort
B. Bubble sort
C. Selection sort
D. Insertion sort
Answer» E.
60.

A________search begins the search with the element that is located in the middle of the array.

A. Serial
B. Parallel
C. Random
D. Binary Search
Answer» E.
61.

At most, how many comparisons are required to search a sorted vector of 1023 elements using the binary search algorithm?

A. 10
B. 15
C. 20
D. 30
Answer» B. 15
62.

Linear search is highly inefficient compared to binary search when dealing with:

A. Small, unsorted arrays
B. Small, sorted arrays
C. Large, unsorted arrays
D. Large, sorted arrays
Answer» E.
63.

Binary search algorithm can not be applied to

A. Sorted linked list
B. Sorted binary trees
C. Sorted linear array
D. Pointer array
Answer» B. Sorted binary trees
64.

Match the following:List Ii. Bubble Sort ii. Shell Sort iii. Selection Sort List IIa. (n)b. (n2)c. (n log n)

A. i a, ii b, iii c
B. i b, ii c, iii a
C. I a, ii c, iii b
D. I b, ii a, iii c
Answer» C. I a, ii c, iii b
65.

Out of the following, the slowest sorting procedure is

A. Quick Sort
B. Heap Sort
C. Shell Sort
D. Bubble Sort
Answer» E.
66.

Quick sort algorithm is an example of

A. Greedy approach
B. Improved binary search
C. Dynamic Programming
D. Divide and conquer
Answer» E.
67.

The average time required to perform a successful sequential search for an element in an array A(1 : n) is given by

A. N
B. (n + 1)/2
C. Log2n
D. N(n + 1)/2
Answer» C. Log2n
68.

The average successful search time taken by binary search on a sorted array of 10 items is

A. 2.7
B. 2.8
C. 2.9
D. 3.0
Answer» D. 3.0
69.

The best average behaviour is shown by

A. Quick Sort
B. Merge Sort
C. Insertion Sort
D. Heap Sort
Answer» B. Merge Sort
70.

The complexity of searching an element from a set of n elements using Binary search algorithm is

A. O(n)
B. O(log n)
C. O(n^2)
D. O(n log n)
Answer» C. O(n^2)
71.

The data for which you are searching is called

A. Binary argument
B. Search argument
C. Sorting argument
D. Detection argument
Answer» C. Sorting argument
72.

The following sorting algorithms maintain two sub-lists, one sorted and one to be sorted

A. Selection Sort
B. Insertion Sort
C. Merge Sort
D. Both A & B
Answer» E.
73.

The minimum number of comparisons required to find the largest number from 4 different numbers are

A. 4
B. 3
C. 5
D. 6
Answer» C. 5
74.

The most-used orders are___________.

A. Numerical order
B. Lexicographical order
C. Both (a) and (b)
D. None of the above
Answer» C. Both (a) and (b)
75.

The number of comparisons done by sequential search is

A. (N/2)+1
B. (N+1)/2
C. (N-1)/2
D. (N+2)/2
Answer» C. (N-1)/2
76.

The number of comparisons required to sort 5 numbers in ascending order using bubble sort is

A. 7
B. 6
C. 10
D. 5
Answer» D. 5
77.

The quick sort algorithm exploit _________ design technique.

A. Greedy
B. Dynamic programming
C. Divide and Conquer
D. Backtracking
Answer» D. Backtracking
78.

The running time of heap sort is __________.

A. G(N*lgN)
B. N(N*lgN)
C. O(N*lgN)
D. None of the above
Answer» D. None of the above
79.

The running time of the following sorting algorithm depends on whether the partitioning is balanced or unbalanced.

A. Insertion sort
B. Selection sort
C. Quick sort
D. Merge sort
Answer» D. Merge sort
80.

The search technique for searching a sorted file that requires increased amount of space is .

A. Indexed sequential search
B. Interpolation search
C. Sequential search
D. Tree search
Answer» B. Interpolation search
81.

The sort which inserts each elements A(K) into proper position in the previously sorted sub array A(1), , A(K 1)

A. Insertion sort
B. Radix sort
C. Merge sort
D. Bubble sort
Answer» B. Radix sort
82.

The sorting technique where array to be sorted is partitioned again and again in such a way that all elements less than or equal to partitioning element appear before it and those which are greater appear after it, is called ..

A. Merge sort
B. Quick sort
C. Selection sort
D. None of these
Answer» C. Selection sort
83.

The time complexity of linear search algorithm over an array of n elements is

A. O(n)
B. 0 (n2)
C. O (log2 n)
D. O(n log2 n)
Answer» B. 0 (n2)
84.

The given array is arr = {1,2,3,4,5}. (bubble sort is implemented with a flag variable)The number of iterations in selection sort and bubble sort respectively are,

A. 5 and 4
B. 1 and 4
C. 0 and 4
D. 4 and 1
Answer» C. 0 and 4
85.

The given array is arr = {1,2,4,3}. Bubble sort is used to sort the array elements. How many iterations will be done to sort the array?

A. 4
B. 2
C. 1
D. 0
Answer» B. 2
86.

The largest and the second largest number from a set of n distinct numbers can be found in

A. O(n)
B. O(2n)
C. O(n^2)
D. O(log n)
Answer» B. O(2n)
87.

The maximum number of comparisons needed to sort 7 items using radix sort is (assume each item is 4 digit decimal number)

A. 23
B. 110
C. 280
D. 450
Answer» D. 450
88.

Shell sort uses .

A. Insertion sort
B. Merge sort
C. Selection sort
D. Quick sort
Answer» B. Merge sort
89.

Sorting is useful for

A. Report generation
B. Responding toe queries easily
C. Making searching easier and efficient
D. All of these
Answer» E.
90.

Sorting makes handling of ______ in a file easier.

A. Records
B. Arrays
C. Information
D. Data
Answer» B. Arrays
91.

The total number of companions required to merge 4 sorted files containing 15, 3, 9 and 8 records into a single sorted file is

A. 66
B. 39
C. 33
D. 15
Answer» D. 15
92.

The way a card game player arranges his cards as he picks them up one by one, is an example of

A. Merge sort
B. Bubble sort
C. Selection sort
D. Insertion sort
Answer» E.
93.

The worst case complexity of binary search matches with

A. Interpolation search
B. Linear search
C. Merge sort
D. None of the above
Answer» C. Merge sort
94.

There is a one line error in the following routine. Find that line.

A. Line 2
B. Line 4
C. Line 6
D. Line 5
Answer» C. Line 6
95.

What refers to a simple sorting algorithm?

A. Bubble sort
B. Insertion sort
C. Unsorted arrays
D. None of the above
Answer» C. Unsorted arrays
96.

When the records are stored in __________ or any secondary storage, then the searching is known as external searching.

A. Disk
B. Files
C. Tape
D. All of the above
Answer» E.
97.

Which array is the fastest on an average, but sometimes unbalanced partitions can lead to very slow sorting?

A. Insertion sort
B. Selection sort
C. Quick sort
D. None of the above
Answer» D. None of the above
98.

What finds the largest element in the array, and puts it in the proper place?

A. Selection sort
B. Insertion sort
C. Quick sort
D. None of the above
Answer» B. Insertion sort
99.

What is not true about insertion sort?

A. Exhibits the worst case performance when the initial array is sorted in reverse order.
B. Worst case and average case performance is (n2)
C. Can be compared to the way a card player arranges his card from a card deck.
D. None of the above.
Answer» E.
100.

What is one of the fastest and simplest sorting algorithms?

A. Selection sort
B. Tree sort
C. Heap sort
D. Quick sort
Answer» E.