Common ๐—ฑ๐—ถ๐—ฐ๐˜ operations in Python.
Run this and more in Memory Graph Web Debugger:https://memory-graph.com/#codeurl=https://raw.githubusercontent.com/bterwijn/memory_graph_examples/refs/heads/main/dict_operations.py&play

#Python #memory_graph #Dict

An exercise to help build the right mental model for Python data.
- Solution: https://memory-graph.com/#codeurl=https://raw.githubusercontent.com/bterwijn/memory_graph_videos/refs/heads/main/exercises/exercise19.py&play
- Explanation: https://github.com/bterwijn/memory_graph?tab=readme-ov-file#python-data-model

The โ€œSolutionโ€ link visualizes execution and reveals whatโ€™s actually happening using ๐—บ๐—ฒ๐—บ๐—ผ๐—ฟ๐˜†_๐—ด๐—ฟ๐—ฎ๐—ฝ๐—ต: https://lnkd.in/e3sUM7wG

#Python #memory_graph #ShallowCopy #DeepCopy

Ever wondered what a Trie actually looks like in memory?

A Trie is a tree of dictionaries, often used for problems like:
- prefix search
- word completion
- spell checking
- sequence matching

Package ๐ฆ๐ž๐ฆ๐จ๐ซ๐ฒ_๐ ๐ซ๐š๐ฉ๐ก can show how data structures like Trie grow step by step. Instead of only reading code, you can see data structures being built in memory.

Run the live demo: https://memory-graph.com/#codeurl=https://raw.githubusercontent.com/bterwijn/memory_graph/refs/heads/main/src/build_trie.py&timestep=0.2&play

More ๐ฆ๐ž๐ฆ๐จ๐ซ๐ฒ_๐ ๐ซ๐š๐ฉ๐ก examples: https://www.linkedin.com/groups/13244150/

#Python #programming #memory_graph

Common ๐—น๐—ถ๐˜€๐˜ operations in Python.
Run this and more in Memory Graph Web Debugger: https://memory-graph.com/#codeurl=https://raw.githubusercontent.com/bterwijn/memory_graph_examples/refs/heads/main/list_operations.py&play

#Python #programming #memory_graph

An exercise to help build the right mental model for Python data.
- Solution: https://memory-graph.com/#codeurl=https://raw.githubusercontent.com/bterwijn/memory_graph_videos/refs/heads/main/exercises/exercise15.py&play
- Explanation: https://github.com/bterwijn/memory_graph?tab=readme-ov-file#python-data-model

The โ€œSolutionโ€ link visualizes execution and reveals whatโ€™s actually happening using ๐—บ๐—ฒ๐—บ๐—ผ๐—ฟ๐˜†_๐—ด๐—ฟ๐—ฎ๐—ฝ๐—ต: https://github.com/bterwijn/memory_graph

#Python #programming #memory_graph

How does Radix Sort work?

Algorithms like Radix Sort: https://memory-graph.com/#codeurl=https://raw.githubusercontent.com/bterwijn/memory_graph/refs/heads/main/src/radix_sort.py&timestep=0.2&play
are much easier to understand when you can see every intermediate step.

Using ๐—บ๐—ฒ๐—บ๐—ผ๐—ฟ๐˜†_๐—ด๐—ฟ๐—ฎ๐—ฝ๐—ต: https://github.com/bterwijn/memory_graph#readme
you can watch how Radix Sort repeatedly applies stable Counting Sort, sorting the least significant digit up to the most significant digit in turn.

Radix Sort is be very efficient, with time complexity O(n ยท d), where 'n' is the number of values and 'd' is the number of digits.

#Python #memory_graph

Algorithms 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': https://memory-graph.com/#codeurl=https://raw.githubusercontent.com/bterwijn/memory_graph/refs/heads/main/src/breadth_first.py&breakpoints=31&continues=1&timestep=0.2&play

๐—บ๐—ฒ๐—บ๐—ผ๐—ฟ๐˜†_๐—ด๐—ฟ๐—ฎ๐—ฝ๐—ต github: https://github.com/bterwijn/memory_graph#readme

#Python #programming #memory_graph

An exercise to help build the right mental model for Python data.
- Solution: https://memory-graph.com/#codeurl=https://raw.githubusercontent.com/bterwijn/memory_graph_videos/refs/heads/main/exercises/exercise12.py&play
- Explanation: https://github.com/bterwijn/memory_graph?tab=readme-ov-file#python-data-model

The โ€œSolutionโ€ link visualizes execution and reveals whatโ€™s actually happening using ๐—บ๐—ฒ๐—บ๐—ผ๐—ฟ๐˜†_๐—ด๐—ฟ๐—ฎ๐—ฝ๐—ต: https://lnkd.in/e3sUM7wG

#Python #programming #memory_graph