Searching Algorithms: Binary Search - Applications - Problem Set

Download Q&A
Q. If a binary search algorithm returns -1, what does it indicate?
  • A. The element is found
  • B. The element is not in the array
  • C. The array is empty
  • D. The array is sorted
Q. What happens if you apply binary search on an unsorted array?
  • A. It will always find the element
  • B. It may return incorrect results
  • C. It will sort the array
  • D. It will throw an error
Q. What is the maximum number of comparisons needed to find an element in an array of size 16 using binary search?
  • A. 4
  • B. 5
  • C. 8
  • D. 16
Q. Which of the following algorithms can be used to find the first occurrence of a target in a sorted array?
  • A. Linear Search
  • B. Binary Search
  • C. Jump Search
  • D. Exponential Search
Q. Which of the following data structures can be efficiently searched using binary search?
  • A. Linked List
  • B. Stack
  • C. Queue
  • D. Sorted Array
Showing 1 to 5 of 5 (1 Pages)
Soulshift Feedback ×

On a scale of 0–10, how likely are you to recommend The Soulshift Academy?

Not likely Very likely