Podcast
Questions and Answers
What is the main requirement for Binary Search?
What is the main requirement for Binary Search?
- The list must be in a random order
- The list must be in an ascending order (correct)
- The list must be in a descending order
- The list must be in a specific order
What is the best way to search an element in Binary Search?
What is the best way to search an element in Binary Search?
- Compare the element with the first element in the list
- Compare the element with the last element in the list
- Compare the element with the center element in the list (correct)
- Compare the element with all the elements in the list
What happens if the element is not found in the center of the list in Binary Search?
What happens if the element is not found in the center of the list in Binary Search?
- The list is divided into two parts (correct)
- The list is divided into three parts
- The list is divided into four parts
- The list is divided into five parts