lc-algo-demo
Add an algorithm visualizer
Write a page into algo_demo/ that behaves like the other 36.
Invocation: /lc-algo-demo <algorithm> — e.g. /lc-algo-demo trie.
Why the contract matters here specifically
algo_demo/ is 36 hand-written pages plus common.js and style.css, with no
generator. site/build.sh copies the directory wholesale. So nothing compiles these
pages, nothing templates them, and every shared behaviour is held together by convention
alone — which means a page that reimplements one of them looks fine in isolation and is
wrong the moment the theme changes, the window resizes, or someone repaints the palette.
Anything that should look or behave the same on all 37 pages belongs in common.js or
style.css, never copy-pasted into a page's inline <script>.
site/test/algo-demo.test.js evaluates the shipped common.js in jsdom and asserts against
it, so a change to the shared files is testable. A change copy-pasted into a page is not.