100 articles · page 16 of 30
Why 90% of CS Graduates Struggle with Level-Order Tree Traversal
A deep dive into level-order tree traversal: why candidates struggle, modern C++ std::queue implementations, B…
LeetCode 2466: Count Ways To Build Good Strings — Tabulation DP vs Memoized DFS & Combinatorics
Comprehensive algorithmic guide for LeetCode 2466 (Count Ways To Build Good Strings): tabulation dynamic progr…
Custom Dockerfile for PHP 5.6 / Apache / WPCLI
I wanted to get my old wordpress 3.4 websites running again, so I had to build a couple docker images, and a d…
Set Matrix Zeroes: Optimal O(1) Space In-Place Algorithm, Boundary Markers & Cache Locality
Comprehensive guide to solving LeetCode 73 Set Matrix Zeroes in-place with O(1) auxiliary space, resolving (0,…
Zigzag string conversion solution in C++
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this Input: s = "PAY…
Search a 2D Matrix: Optimal Binary Search, Staircase Elimination & Memory Locality
Algorithmic guide to searching 2D sorted matrices: virtual 1D binary search, top-right staircase elimination, …
LeetCode 543: Diameter of a Binary Tree in C++ & Post-Order DFS
Master LeetCode 543 (Diameter of a Binary Tree) in C++: post-order DFS height calculation, eliminating O(N^2) …
401. Binary Watch
An in-depth algorithmic guide to LeetCode 401: Binary Watch, featuring Cartesian search, bit manipulation, and…
Letter Combinations of a Phone Number: Combinatorial Backtracking & T9 Algorithms
Master LeetCode 17 (Letter Combinations of a Phone Number): combinatorial backtracking DFS, BFS queue generati…
LeetCode 20: Valid Parentheses in TypeScript & V8 Stack Mechanics
Master LeetCode 20 (Valid Parentheses) in TypeScript: LIFO stack mechanics, V8 array internals, early exit bra…
Max Chunks To Make Sorted
You are given an integer array arr of length n that represents a permutation of the intege…
Final Prices With a Special Discount in a Shop
You are given an integer array prices where prices[i] is the price of the ith it…
