A public digital garden documenting my journey through bugs, features, and the chaotic beauty of web development.
Use Kadane's Algorithm to find the maximum sum subarray in O(n) time with O(1) space.
Maximize water storage in a container using a Two-Pointer approach to achieve optimal O(n) time complexity.
Count set bits in O(k) time using Brian Kernighan's bit trick — where k is the number of 1-bits.
Peel the matrix layer by layer using four shrinking boundaries — a classic simulation problem.
A detailed breakdown of the DP string segmentation approach, optimizing for both speed and memory.