Skip to content
CodeShare

Lens

Watch code run one line at a time: every variable, array, table, linked list and tree drawn as it changes. It's built into every room, too: write any code and press Visualize.

Popular

Linked lists·O(n)

Reverse a linked list

Walk the list once, turning every next pointer around.

Loading...

Lens records up to 1,000 steps. The first Python run downloads Python, which takes a few seconds.

Concept library

40 classic algorithms and data structures, each ready to watch in Python, JavaScript or TypeScript.

Arrays & pointers

Searching

Hashing

Sorting

Stacks & queues

Linked lists

Heaps

Trees

Graphs

Recursion & backtracking

Dynamic programming