Linked list#6
Merged
Merged
Conversation
New /linked-list route animating singly and doubly linked lists with insert (head/tail/index), delete (by value/index), search, and reverse. - Box-style two-cell nodes (data + pointer cell) rendered in SVG, with CSS-transition movement and a SMIL mount fade-in - Head/tail null terminators shown as slashes; doubly mode adds prev pointers and a left null terminator on the head - Page drives step-by-step animations imperatively with refs + sleep, mirroring the recursion-tree pattern - Added a Linked List card to the home page grid
Operations are now pure planners in lib/algorithms/linkedList.js that return a flat list of actions (mark, setNext, stageNode, lift, drop, removeNode, reorder, ...); the page is a generic executor that applies each action with a delay. Adding an operation no longer needs a new run-loop in the page. Insert and delete are now staged for clarity: - Insert: node floats above its slot, wires next then prev, drops in - Delete: node is flagged, lifts out, predecessor bypasses it, removed Also namespace SVG sibling keys to fix a duplicate-key warning (node ids collided with pointer-caption indices), and add a real thumbnail.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new component linked list with addition, deletion and reverse operation.