Question
What is the best-case time complexity of the binary
search algorithm ?Solution
The best-case time complexity of the binary search algorithm is O(1), which occurs when the target element is found at the middle index on the very first comparison. Binary search divides the array into two halves and compares the middle element with the target. If the middle element matches the target, the search terminates immediately, requiring only one comparison. This efficiency makes binary search a powerful tool for sorted data. Why Other Options Are Incorrect :
- O(n) : This is the time complexity of linear search, where each element is compared sequentially. Binary search is much faster than linear search for sorted data.
- O(log n) : This is the average and worst-case time complexity of binary search, not the best case.
- O(n2) : This is the complexity of algorithms like bubble sort or selection sort, not binary search.
- O(nlog n) : This is the complexity of efficient sorting algorithms like merge sort, not binary search.
The Viksit Bharat – Guarantee for Rozgar and Ajeevika Mission (Gramin) [VB–G RAM G] Act, 2025 provides a statutory guarantee of how many days of emp...
The revamped UDAN (Ude Desh ka Aam Naagrik) Scheme approved in March 2026 will be implemented for how many years?
The new oil refinery announced in the United States in March 2026, involving investment from Reliance Industries, will be built at:
The Lok Sabha passed a Bill to raise the FDI limit in the insurance sector to:
What is the name of the flood forecasting system launched by the Ministry of Jal Shakti?
- Which country recently became India’s top trading partner in FY25, overtaking China?
Which among the following states/UTs were categorised as “Exemplars” in the LEADS 2025 Report?
Which city was named the most livable city in the world for 2024 by the Economist Intelligence Unit (EIU)?
Who is the author of Book “Sachin@50” ?
- Which of the following is NOT a key goal of the Parvatmala Pariyojana?