Question

    Which sorting algorithm has a worst-case time complexity

    of O(n²)?
    A Merge Sort Correct Answer Incorrect Answer
    B Quick Sort Correct Answer Incorrect Answer
    C Bubble Sort Correct Answer Incorrect Answer
    D Heap Sort Correct Answer Incorrect Answer

    Solution

    Bubble Sort has a worst-case time complexity of O(n²), making it inefficient for large datasets.

    Practice Next

    Relevant for Exams: