← home

Writing / 63 entries

Code, Solutions
& Discovery.

A public digital garden — bugs, breakthroughs, and the chaos of building things on the web.

↳ dsa
clear↓ newest
alldsa34python29interview26leetcode22algorithms16guide11
01
May 20, 2026#leetcode#python

LeetCode 208: Implement Trie (Prefix Tree)

Understand how to design and build a highly optimized prefix tree from scratch in Python.

02
May 20, 2026#leetcode#python

LeetCode 118: Pascal's Triangle

Deep dive into constructing Pascal's Triangle with O(n^2) time and optimal memory efficiency in Python.

03
May 16, 2026#leetcode#python

LeetCode 211: Design Add and Search Words Data Structure

Efficient wildcard searching using an optimized Python Trie.

04
May 15, 2026#leetcode#python

LeetCode 53: Maximum Subarray

Use Kadane's Algorithm to find the maximum sum subarray in O(n) time with O(1) space.

05
May 15, 2026#leetcode#python

LeetCode 11: Container With Most Water

Maximize water storage in a container using a Two-Pointer approach to achieve optimal O(n) time complexity.

06
May 14, 2026#leetcode#python

LeetCode 191: Number of 1 Bits

Count set bits in O(k) time using Brian Kernighan's bit trick — where k is the number of 1-bits.

07
May 14, 2026#leetcode#python

LeetCode 54: Spiral Matrix

Peel the matrix layer by layer using four shrinking boundaries — a classic simulation problem.

08
May 13, 2026#leetcode#python

LeetCode 139: Word Break

A detailed breakdown of the DP string segmentation approach, optimizing for both speed and memory.

prev01 / 05next