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.
2. The second largest number from a set of n distinct numbers can be found in
O(n)
O(2n)
O(n^2)
O(log n)
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
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
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.
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
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
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
6. A pivot element to partition unsorted list is used in
Merge Sort
Quick Sort
Insertion Sort
Selection Sort
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
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
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
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
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
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
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
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
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
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
14. A technique for direct search is
Binary Search
Linear Search
Tree Search
Hashing
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
Answer & Solution
No Solution for this Answer..! Report or Discus this Question