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.
17. An array sorted in the reverse order is the __________ case input.
Worst
Best
Somewhat bad
None of the above
18. 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
Heap sort
Bubble sort
Selection sort
Insertion sort
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
19. At most, how many comparisons are required to search a sorted vector of 1023 elements using the binary search algorithm?
10
15
20
30
20. A________search begins the search with the element that is located in the middle of the array.
Serial
Parallel
Random
Binary Search
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
21. Binary search algorithm can not be applied to
Sorted linked list
Sorted binary trees
Sorted linear array
Pointer array
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
22. Binary Search can be categorized into which of the following?
Brute Force technique
Divide and conquer
Greedy algorithm
Dynamic programming
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
23. Brute-force search, commonly known as_________.
Naive algorithm
Uninformed algorithm
Both (a) and (b)
Search algorithm
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
24. Choose among the following code for an iterative binary search.
A
B
C
D
25. Choose the appropriate code snippet that performs uniform binary search.
A
B
C
D
26. Choose the appropriate code that does binary search using recursion.
A
B
C
D
27. Choose the code snippet which uses recursion for linear search.
A
B
C
D
28. Choose the correct statements
External sorting needs auxilary storage
External sorting is used if the number of items to be sorted is very large.
Both (a) and (b)
Internal sorting is used if the number of items to be sorted is very large.
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
29. Choose the recursive formula for the Fibonacci series.(n>=1)
F(n) = F(n+1) + F(n+2)
F(n) = F(n) + F(n+1)
F(n) = F(n-1) + F(n-2)
F(n) = F(n-1) – F(n-2)
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
30. Compared to insertion sort, _________ are more advanced algorithms.
Quick sort
Heap sort
Merge sort
All of the above
Answer & Solution
No Solution for this Answer..! Report or Discus this Question