leetcode.nsisong.com

LeetCode playbook

I keep short notes for every problem I solve. Explore the breakdowns, complexity calls, and the exact files that live in this repo.

Latest write-ups

UnknownPython
Unique Paths Ii

quick reference for unique paths ii. more notes soon.

python
UnknownC++, Java
Walking Robot Simulation

quick reference for walking robot simulation. more notes soon.

c++java
UnknownTypeScript
Wiggle Sort Ii

quick reference for wiggle sort ii. more notes soon.

typescript
UnknownTypeScript
Largest Plus Sign

quick reference for largest plus sign. more notes soon.

typescript
UnknownSQL
Movie Rating

quick reference for movie rating. more notes soon.

sql
UnknownTypeScript
Game Theory

quick reference for game theory. more notes soon.

typescript
UnknownPython
Zuma Game

quick reference for zuma game. more notes soon.

python
UnknownPython
Candy

quick reference for candy. more notes soon.

python
UnknownPHP
Max Points On Line

quick reference for max points on line. more notes soon.

php
UnknownErlang, PHP
Median Of Two Sorted Arrays

quick reference for median of two sorted arrays. more notes soon.

erlangphp
UnknownPHP
Maximal Square

quick reference for maximal square. more notes soon.

php
UnknownScala
Special Array I

quick reference for special array i. more notes soon.

scala
UnknownPython
Word Ladder

quick reference for word ladder. more notes soon.

python
UnknownTypeScript
Search A 2d Matrix

quick reference for search a 2d matrix. more notes soon.

typescript
UnknownPython
Palindrome Pairs

quick reference for palindrome pairs. more notes soon.

python
UnknownPython
Sliding Window Median

quick reference for sliding window median. more notes soon.

python
UnknownPHP
Addtwonumbers

quick reference for addtwonumbers. more notes soon.

php
UnknownPHP
Valid Number

quick reference for valid number. more notes soon.

php
UnknownC
Set Matrix Zeroes

quick reference for set matrix zeroes. more notes soon.

c
UnknownTypeScript
Stamping The Grid

quick reference for stamping the grid. more notes soon.

typescript
UnknownPHP
Number Of Digit One

quick reference for number of digit one. more notes soon.

php
UnknownPHP
Strong Password Checker

quick reference for strong password checker. more notes soon.

php
UnknownTypeScript
Magic Squares In Grid

quick reference for magic squares in grid. more notes soon.

typescript
UnknownTypeScript
Maximum Sum Of An Hourglass

quick reference for maximum sum of an hourglass. more notes soon.

typescript
UnknownErlang, PHP
Word Ladder 2

quick reference for word ladder 2. more notes soon.

erlangphp
UnknownPython
Insertion Sort List

quick reference for insertion sort list. more notes soon.

python
MediumTypeScript
Maximum Sum of an Hourglass

Sliding a fixed hourglass mask through the grid and tracking the best sum with constant-time updates.

arraysprefix-sumgrid
MediumTypeScript
Maximize Area of Square Hole in Grid

Binary search on the side length of the square holes while counting rails removed along each axis.

binary-searchsortinggreedy
UnknownPython
Select Data

quick reference for select data. more notes soon.

python
MediumTypeScript
Magic Squares in Grid

Check every 3×3 window for the 1..9 magic square pattern using center and parity pruning.

gridbrute-forcehashing
UnknownC++
Largest Magic Square

quick reference for largest magic square. more notes soon.

c++
UnknownErlang, PHP
Contains Duplicate 3

quick reference for contains duplicate 3. more notes soon.

erlangphp
UnknownPython
Reverse Pairs

quick reference for reverse pairs. more notes soon.

python
UnknownTypeScript
Design Neighbor Sum Service

quick reference for design neighbor sum service. more notes soon.

typescript
UnknownPHP
Count Of Range Sum

quick reference for count of range sum. more notes soon.

php
UnknownPython
Minimum Path Sum

quick reference for minimum path sum. more notes soon.

python
UnknownC++
Sort List

quick reference for sort list. more notes soon.

c++
UnknownErlang, PHP
Wildcard Matching

quick reference for wildcard matching. more notes soon.

erlangphp
UnknownPython
Two Sum

quick reference for two sum. more notes soon.

python
UnknownPHP
First Missing Positive

quick reference for first missing positive. more notes soon.

php
UnknownPython
Sort Colors

quick reference for sort colors. more notes soon.

python
UnknownGo
Matrix Block Sum

quick reference for matrix block sum. more notes soon.

go
UnknownPHP
Russian Doll Envelopes

quick reference for russian doll envelopes. more notes soon.

php
UnknownTypeScript
Simplify Path

quick reference for simplify path. more notes soon.

typescript