Skip to main content

Algorithmic Archive

LeetCode Problem Notes

Walkthroughs, intuition, and complexity analyses for algorithmic challenges across graphs, matrices, trees, and sorting.

May 31, 20255 min read

909. Snakes and Ladders (31 May 2025)

Snakes and Ladders

MatrixBFS
View solution
May 30, 20255 min read

2359. Find Closest Node to Given Two Nodes (30 May 2025)

Find closest node using tree traversal

DFSGraph
View solution
Jul 24, 20245 min read

2191. Sort the Jumbled Numbers (24 July 2024)

Learn how to sort an array of numbers based on a custom digit mapping.

ArraySortingMap
View solution
Jul 23, 20243 min read

1636. Sort Array by Increasing Frequency (23 July 2024)

Learn how to sort an array by the frequency of elements in ascending order using an unordered map in C++.

ArraySortingHash Table
View solution
Jul 22, 20243 min read

2418. Sort the People (22 July 2024)

Learn how to sort a list of people by their heights in descending order using map data structure in C++.

ArraySortingMap
View solution
Jul 20, 20245 min read

2392. Build a Matrix With Conditions (21 July 2024)

Learn how to construct a valid matrix with given row and column conditions using topological sorting and graph theory.

ArrayMatrixGraphTopological Sort
View solution
Jul 20, 20245 min read

1605. Find Valid Matrix Given Row and Column Sums (20 July 2024)

Explore how to construct a valid matrix given row and column sums.

ArrayMatrixGreedy
View solution
Jul 19, 20245 min read

1380. Lucky Numbers in a Matrix (19 July 2024)

Expore how to find the lucky numbers in a matrix.

ArrayMatrix
View solution
Jul 18, 20245 min read

1530. Number of Good Leaf Nodes Pairs (18 July 2024)

Explore how to find the number of good leaf node pairs in a binary tree within a specified distance.

TreeDepth-First SearchBinary Tree
View solution