B-tree Insertion Visualization
This project turns B-tree insertion into a clear, step-by-step visual narrative. Instead of jumping from code to a final tree, learners see each decision: where the key goes, when a node overflows, and how a split rebalances the tree.
Designed with HCI/UX principles (clarity, progressive disclosure, consistent feedback) so beginners can build a correct mental model before writing code.
Quick Facts
Problem
Many students can memorize “insert then split,” but still don’t understand when a split happens and how the tree changes. Textbook diagrams often skip intermediate states, making it hard to form a correct mental model.
Solution
A step-by-step visualization that reveals insertion states in a consistent sequence:
- Locate the target leaf (highlight path)
- Insert the key (animated placement)
- Detect overflow (clear warning state)
- Split (promote median, redistribute keys)
- Repeat upward when needed (progressive disclosure)
Key UX/UI Decisions
Demo / Media
Animation
This animation shows how keys are inserted into a B-tree while maintaining balance through node splitting and key promotion.
Process
- Storyboard each insertion step (states + captions).
- Define visual rules (highlight logic, typography hierarchy, spacing).
- Animate with consistent transitions (insert → overflow → split).
- Refine pacing based on where beginners get confused (especially root split).
Outcome
The final experience supports “mental model first” learning: learners can explain the reason for splits and predict the next tree state. This becomes a bridge to code implementation (pseudo-code + real code can be shown side-by-side in later iterations).
Next Steps
- Add a “Try it” mode with predefined key sequences (beginner-friendly).
- Add checkpoints (quick questions) to confirm understanding before continuing.
- Optional AI helper: “Why did we split here?” with short, context-aware explanations.