Algorithms
First observe the behavior in Explore mode, then switch to Apply to test each operation with intent.
Sorting is fundamental for efficient searching, analysis, and data organization. Different algorithms suit different scenarios based on time complexity and space usage.
Bubble Sort: O(n²) - Simple but slow, stable, in-place
Database sorting: Uses variants of Quick Sort
Sorting compares values and reorders bars from smaller to larger.
Ready|Waiting for bubble sort
Time: O(n^2)|Space: O(1)
Pseudocode
Sorting becomes easier to see when compare, swap, and sorted states are visually separated.
Explore mode: click bars to inspect values and positions.
Merge Sort: O(n log n) - Fast, stable, requires extra space
Bubble Sort: O(n²) - Simple but slow, stable, in-place
In Apply mode, test one operation and explain its complexity before running the next.
Before clicking run, predict the next index/pointer movement and then verify it.