📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!


    Question

    Binary Search is an efficient searching algorithm that

    follows the Divide and Conquer approach. What is its time complexity?
    A O(N) Correct Answer Incorrect Answer
    B O(N log N) Correct Answer Incorrect Answer
    C O(log N) Correct Answer Incorrect Answer
    D O(N²) Correct Answer Incorrect Answer
    E O(1) Correct Answer Incorrect Answer

    Solution

    Binary Search repeatedly halves the search space. If the input size is N, after one comparison, the problem size becomes N/2. After two comparisons, it's N/4, and so on. This logarithmic reduction in search space leads to a time complexity of O(log N).

    Practice Next
    ask-question