Sorting and Searching Mcqs

Our collections of Multiple choice questions and answers focuses on study of ” Sorting and Searching ” in Data Structures. These questions are chosen from a collection of most authoritative and best reference books on Data Structures. Our aim is to prepare an individual for competitive exams like NTS | GAT | ECAT | Data Warehouse jobs | Data Mining | DB administration jobs Software House and Computer Programmer jobs | University and College entrance exams and various tests and job interviews. One should practice our Mcqs to assimilate Sorting and Searching comprehensively.

  1. Home
  2. »
  3. Computer Science Mcqs
  4. »
  5. Data Structures Mcqs
  6. »
  7. Sorting and Searching Mcqs

1.
A desirable choice for the partitioning element in quick sort is

First element of the list

Last element of the list

Randomly chosen element of the list

Median of the list

3.
A character of the data that binary search uses but the linear search ignores, is

Maximum value in the list

Minimum value in list

Length of the list

Order of the list

4.
A characteristic of the data that binary search uses but the linear search ignores is the___________.

Order of the elements of the list.

Length of the list.

Maximum value in list.

Type of elements of the list.

5.
A man wants to go different places in the world. He has listed them down all. But there are some places where he wants to visit before some other places. What application of graph can he use to determine that?

Depth First Search

Breadth First Search

Topological Sorting

Dijkstra’s Shortest path algorithm

6.
A pivot element to partition unsorted list is used in

Merge Sort

Quick Sort

Insertion Sort

Selection Sort

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

Serial

Binary

Parallel

Random

8.
A sort which compares adjacent elements in a list and switches where necessary is

Heap sort

Quick sort

Bubble sort

Insertion sort

9.
A sort which iteratively passes through a list to exchange the first element with any element less than it and then repeats with a new first element is called

Heap sort

Quick sort

Selection sort

Insertion sort

10.
A sort which relatively passes through a list to exchange the first element with any element less than it and then repeats with a new first element is called

Insertion sort

Selection sort

Heap sort

Quick sort

11.
A sorted file contains 16 items. Using binary search, the maximum number of comparisons to search for an item in this file is ………..

15

8

1

4

12.
A sorting algorithm is stable if

Its time complexity is constant irrespective of the nature of input

Preserves the original order of records with equal keys

Its space complexity is constant irrespective of the nature of input

It sorts any volume of data in a constant time

13.
A sorting technique that guarantees that records with the same primary key occurs in the same order in the sorted list as in the original unsorted list is said to be

Stable

Linear

External

Consistent

15.
After each iteration in bubble sort:

At least one element is at its sorted position

One less comparison is made in the next iteration

Both a & b are true

Neither a nor b is true

0Shares
0
Scroll to Top