Interactive algorithm visualizations
See the codeAlgorithm → AST → CSS (3 x JavaScript)
Inspired by Grokking Algorithms and python-execution-trace, this project aims to reveal the mechanics behind algorithms via interactive visualizations of their execution.
Visual representations of variables and operations augment the control flow, alongside actual source code. You can fast forward and rewind the execution to closely observe how an algorithm works.
Edge cases and optimizations are beyond the scope of this project. The featured implementations are chosen for their simplicity and do not promise to work for data sets different from the illustrated ones. Please rely on other resources for learning algorithms in depth, from Wikipedia to other visualization projects. Also see community-driven Footnotes. Thanks.
This project uses styled-jsx, but takes the idea of CSS-in-JS even further. Sizing, positioning and transition offsets are computed by JS, all before elements hit the DOM. This provides complete control over layout (e.g. font scaling relative to container width, rounded to a multiplier of 2) and animation (e.g. pausing in the middle of a transition and rewinding). It's a wild concept that hopefully gets mainstream someday.
Consider the following actions if you want to advance this project:
Before submitting a PR, make sure to:
npm run testnpm i
# Start Next.js server (localhost:3000)
npm run dev
# Run tests
npm test
# Start React Cosmos playground (localhost:8989)
npm run cosmos
While this project doesn't focus on algorithm implementation specifics, here's a list of valuable insights brought up by the community which serves to complement the visuals.
mid can be improved to avoid overflow when list is sufficiently large enough (@mhaji)Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
5,350 followers · starred Feb 2017
368 followers · starred Jan 2017
4,068 followers · starred Jan 2017
24,658 followers · starred Jan 2017
Interactive algorithm visualizations
See the codeAlgorithm → AST → CSS (3 x JavaScript)
Inspired by Grokking Algorithms and python-execution-trace, this project aims to reveal the mechanics behind algorithms via interactive visualizations of their execution.
Visual representations of variables and operations augment the control flow, alongside actual source code. You can fast forward and rewind the execution to closely observe how an algorithm works.
Edge cases and optimizations are beyond the scope of this project. The featured implementations are chosen for their simplicity and do not promise to work for data sets different from the illustrated ones. Please rely on other resources for learning algorithms in depth, from Wikipedia to other visualization projects. Also see community-driven Footnotes. Thanks.
This project uses styled-jsx, but takes the idea of CSS-in-JS even further. Sizing, positioning and transition offsets are computed by JS, all before elements hit the DOM. This provides complete control over layout (e.g. font scaling relative to container width, rounded to a multiplier of 2) and animation (e.g. pausing in the middle of a transition and rewinding). It's a wild concept that hopefully gets mainstream someday.
Consider the following actions if you want to advance this project:
Before submitting a PR, make sure to:
npm run testnpm i
# Start Next.js server (localhost:3000)
npm run dev
# Run tests
npm test
# Start React Cosmos playground (localhost:8989)
npm run cosmos
While this project doesn't focus on algorithm implementation specifics, here's a list of valuable insights brought up by the community which serves to complement the visuals.
mid can be improved to avoid overflow when list is sufficiently large enough (@mhaji)Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
5,350 followers · starred Feb 2017
368 followers · starred Jan 2017
4,068 followers · starred Jan 2017
24,658 followers · starred Jan 2017