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


    Question

    For a binary search algorithm to work efficiently, what

    must be true about the input data?
    A It must be unsorted. Correct Answer Incorrect Answer
    B It must contain unique elements. Correct Answer Incorrect Answer
    C It must be sorted. Correct Answer Incorrect Answer
    D It must be a linked list. Correct Answer Incorrect Answer
    E It must be a hash table. Correct Answer Incorrect Answer

    Solution

    Binary Search operates on the principle of repeatedly dividing the search interval in half. This is only possible if the data is sorted, allowing the algorithm to determine which half to continue searching in based on the comparison with the middle element.

    Practice Next
    ask-question