Skip to content

Linked list#6

Merged
TamimEhsan merged 2 commits into
masterfrom
linked-list
Jun 9, 2026
Merged

Linked list#6
TamimEhsan merged 2 commits into
masterfrom
linked-list

Conversation

@TamimEhsan

Copy link
Copy Markdown
Owner

This PR adds a new component linked list with addition, deletion and reverse operation.

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.
@TamimEhsan TamimEhsan merged commit 1725c7b into master Jun 9, 2026
1 of 2 checks passed
@TamimEhsan TamimEhsan deleted the linked-list branch June 11, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant