Animating Algorithms in SwiftUI: A Step-Recorder Pattern for Visualising Sorts, Searches and Graphs
Separate the algorithm from the animation, record every step as data, then play it back with play, pause, speed and scrubbing, accessibly
When I was learning data structures, the textbook diagrams we