DEV Community

Cover image for Singly Linked List implementation in JS + DOM visualization
Lakshya Thakur
Lakshya Thakur

Posted on

1

Singly Linked List implementation in JS + DOM visualization

My goto programming language solving an algorithmic problem has always been C++.

But few days ago I thought, let’s create a linked list in JS since that’s what I use in my day to day work.

I lost track of when the initial requirement transformed into visualizing the same using DOM APIs.

Functionalities:-
📌 Insert node at any position.
📌 Delete node using reference or delete single or multiple nodes using value.

That Next State button works using generator function which loops over a predefined operations list to be performed on this linked list and yields on each button click.

P.S. - Feel free to play around and implement more functionalities if you want.

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay