AlgoViz

Singly linked list

easy 18 min

A singly linked list is a chain of nodes where each node holds a value and a pointer to the next node.

A singly linked list class with every core operation

Read it, run it, change a line and run it again.

Loading editor…

Keeps a size counter. Out-of-range positions raise IndexError instead of failing with an AttributeError deep inside a loop.