Small games and the code behind them. Short coding lessons with real code and real output.

New Delhi
Joined January 2021
Python Fibonacci without recursion. 馃悕 a, b = 0, 1 for _ in range(n): a, b = b, a + b fib(5000) works. No cache needed. #Python #Coding
1
1
6
Python dynamic programming with lru_cache, in 4 images. 馃悕 One decorator, one table, one rule: solve each subproblem once. #Python #Coding
1
1
25
Full video, Dijkstra and Weighted Graphs: youtu.be/q77VxBaM-zc
2
Python heapq with tuples, in 4 images. 馃悕 #Python #Coding
1
1
9
Python Dijkstra's algorithm with heapq, in 4 images. 馃悕 A weighted graph, a heap, and one rule: keep the cheaper distance. #Python #Coding
1
1
17
Full video, Dijkstra and Weighted Graphs: youtu.be/q77VxBaM-zc
Python heapq with tuples. 馃悕 heappush(heap, (3, "A")) heappop(heap) -> 1 C, 3 A, 3 B, 4 D Distance first = cheapest first. #Python #Coding
1
1
6