What is the main disadvantage of the bubble sort algorithm?
- Cannot handle duplicate elements
- High space complexity
- Inefficient for large lists
- Not stable
The main disadvantage of the bubble sort algorithm is its inefficiency for large lists, as it has a worst-case time complexity of O(n^2), making it impractical for sorting large datasets.
Loading...
Related Quiz
- How can you measure the effectiveness of a string compression algorithm?
- The space complexity of radix sort is _______ compared to other sorting algorithms like merge sort and quick sort.
- Edit Distance is particularly useful in _______ processing tasks, such as automatic summarization and _______ recognition.
- Discuss the space complexity of merge sort and how it compares to other sorting algorithms.
- BFS guarantees finding the shortest path in an unweighted graph due to its _______ approach.