Skip to main content
SU KOAA / LEARN

Algorithm knowledge check

Ten short questions on sorting, searching, graphs, trees and recursion. Answers are explained after submission.

Back to Algorithm Studio
Answered0/10
Attempts on this device0
Best score0/10
01 · SortingWhat is the worst-case time complexity of Bubble Sort?
02 · SortingWhat is the worst-case time complexity of Merge Sort?
03 · SortingWhen can Quick Sort take O(n²) time?
04 · SearchingWhat must be true for binary search to work correctly?
05 · GraphsWhich structure naturally supports iterative depth-first search?
06 · GraphsWhich structure naturally supports breadth-first search?
07 · GraphsWhat restriction applies to Dijkstra’s standard shortest-path algorithm?
08 · TreesWhat is the worst-case search time in an unbalanced binary search tree?
09 · TreesWhere is the smallest element in a min-heap?
10 · RecursionWhy does a recursive function need a base case?

Complexity quick reference

Worst-case bounds unless a note states otherwise. V = vertices; E = edges.

AlgorithmTimeExtra spaceWhy it matters
Bubble SortO(n²)O(1)In-place; optimized early-exit best case O(n).
Merge SortO(n log n)O(n)Predictable time; auxiliary merge storage.
Quick SortO(n²) worstO(n) worst stackAverage O(n log n); pivot strategy matters.
Binary SearchO(log n)O(1) iterativeRequires sorted input.
BFS / DFSO(V + E)O(V)Traversal of vertices and edges.
Dijkstra (simple)O(V² + E)O(V + E)This complexity describes a linear-minimum selection implementation.
BST (unbalanced)O(n) worstO(n) worstBalanced trees typically offer O(log n) search.
Min-heap insert/removeO(log n)O(1) auxiliaryFinding minimum is O(1).

Progress is stored only in this browser's local storage. It is not synced to your SUKOAA account or Supabase.