Indexing
Hashing your keys…
Initializing Sorting Algorithms...
Sorting
Trees
Graphs
Preparing interactive visualizations...
Indexing
Hashing your keys…
Balance by colour rather than strict height. A red uncle is repaired by recolouring alone; only a black uncle forces the shape to change.
Try 10, 20, 30 — ascending keys force a rotation straight away.
Click Play to begin
O(log n)O(log n)≤ 2O(n)Question 1 of 3
A newly inserted node is always coloured red. Why not black?