Create a custom practice set
Pick category, difficulty, number of questions, and time limit. Start instantly with your own quiz.
Generate QuizPick category, difficulty, number of questions, and time limit. Start instantly with your own quiz.
Generate QuizNo weekly quiz is published yet. Check the weekly page for the latest updates.
View Weekly PageAnswer: Bubble Sort
Bubble Sort with optimization (stop if no swaps in a pass) achieves O(n) best-case for already sorted input. However, average/worst-case remains O(n²). For exams: know trade-offs - Bubble (simple, inefficient), Quick (fast average, worst O(n²)), Merge (stable, O(n log n) always), Heap (in-place, O(n log n)).