FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

algorithms/leetcode at master · svetanis/algorithms · GitHub

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

LeetCode Write-ups — Java

Long-form write-ups for the problems in this repository that are solved more than once in the source tree — brute force, memoized, tabulated, space-optimized.

Each page walks the whole progression and shows why each step is forced by the previous one's failure, with the measured verdict for every version: what times out, what overflows the stack, what actually passes. These are the problems where reading only the optimal solution teaches you the least.

Pages are grouped below by what "solved more than once" actually means for that family, because the thing that connects one approach to the next is different in each: dynamic programming (one recurrence, four implementations), graphs (genuinely different algorithms, chosen not forced), trees (recursive vs iterative vs traversal property), and data structures (Fenwick tree vs segment tree vs merge-sort counting). Sections appear as their first page lands.

Filenames stay flat — NNN-problem-slug.md — so a page's path never changes once it is linked.

Dynamic programming

One recurrence, implemented four or five ways. The page is about why each step is forced by the previous one's failure.

# Problem Approaches The step most write-ups skip
416 Partition Equal Subset Sum 6 The same memoization that sinks 518 is enough here — and one word in the recurrence tells you which case you are in beforehand
518 Coin Change II 5 Memoization fixes the time complexity and the solution still fails — on stack depth, not on time

Java source for every solution lives under src/main/java/com/svetanis/algorithms/.


Back | FazBrowse Home | New Git URL