
Python Data Model exercise for right metal model for Python data
An exercise to help build the right mental model for Python data.
The “Solution” link visualizes execution and reveals what’s actually happening using 𝗺𝗲𝗺𝗼𝗿𝘆_𝗴𝗿𝗮𝗽𝗵.

An exercise to help build the right mental model for Python data.
The “Solution” link visualizes execution and reveals what’s actually happening using 𝗺𝗲𝗺𝗼𝗿𝘆_𝗴𝗿𝗮𝗽𝗵.
Understanding and debugging data structures becomes much easier when you can simply see the structure of your data with 𝗺𝗲𝗺𝗼𝗿𝘆_𝗴𝗿𝗮𝗽𝗵.
Run this Linked List live demo.
A linked list is a nice teaching example because it makes references very explicit:
Normally, students have to imagine all of this in their head. With 𝗺𝗲𝗺𝗼𝗿𝘆_𝗴𝗿𝗮𝗽𝗵, they can inspect the actual Python objects and references directly. That makes it easier to understand:
For beginners, this helps build the right mental model of Python data. For more advanced students, it helps debug pointer-like reference bugs in data structures.
An exercise to help build the right mental model for Python data.
The “Solution” link visualizes execution and reveals what’s actually happening using 𝗺𝗲𝗺𝗼𝗿𝘆_𝗴𝗿𝗮𝗽𝗵.
Algorithms like Radix Sort are much easier to understand when you can see every intermediate step.
Using 𝗺𝗲𝗺𝗼𝗿𝘆_𝗴𝗿𝗮𝗽𝗵, you can watch how Radix Sort repeatedly applies stable Counting Sort, sorting the least significant digit up to the most significant digit in turn.
The key idea is stability: after sorting by a later digit, the order created by earlier digit-sorts is preserved resulting in a full sorted sequence.
For fixed-size integers, Radix Sort can be very efficient, with time complexity O(n · d), where 'n' is the number of values and 'd' is the number of digits.
Algorithms like Radix Sort are much easier to understand when you can see every intermediate step.
Using 𝗺𝗲𝗺𝗼𝗿𝘆_𝗴𝗿𝗮𝗽𝗵, you can watch how Radix Sort repeatedly applies stable Counting Sort, sorting the least significant digit up to the most significant digit in turn.
The key idea is stability: after sorting by a later digit, the order created by earlier digit-sorts is preserved resulting in a fully sorted sequence.
For fixed-size integers, Radix Sort can be very efficient, with time complexity O(n · d), where 'n' is the number of values and 'd' is the number of digits.
An exercise to help build the right mental model for Python data.
The “Solution” link visualizes execution and reveals what’s actually happening using 𝗺𝗲𝗺𝗼𝗿𝘆_𝗴𝗿𝗮𝗽𝗵.
Algorithms in Python can be much easier understood with step-by-step visualization using 𝗺𝗲𝗺𝗼𝗿𝘆_𝗴𝗿𝗮𝗽𝗵. Here we show a simple DNA k-mer counting algorithm.
Algorithms in Python can be much easier understood with step-by-step visualization using 𝗺𝗲𝗺𝗼𝗿𝘆_𝗴𝗿𝗮𝗽𝗵. Here we show a simple DNA k-mer counting algorithm.
Algorithms in Python can be easier understood with step-by-step visualization using 𝗺𝗲𝗺𝗼𝗿𝘆_𝗴𝗿𝗮𝗽𝗵. Here we show a Breadth First algorithm that finds the shortest path in a graph from node 'a' to node 'b'.