Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Log

A public interview-prep journal for turning LeetCode practice into reusable patterns, not just final answers.

Each problem entry includes the final Python solution, complexity analysis, pitfalls, breakthroughs, and a short mental model to make the pattern easier to recognize in interviews.

Current Entries

Problem Difficulty Pattern
Two Sum Easy Hash map lookup
Contains Duplicate Easy Hash set membership
Valid Anagram Easy Frequency counting
Valid Palindrome Easy Opposite-end two pointers
Remove Duplicates from Sorted Array Easy Two pointers / in-place array
Find the Index of the First Occurrence in a String Easy Fixed-size sliding window
Linked List Cycle Easy Fast/slow pointers
Reverse Linked List Easy Linked list pointer reversal
Merge Two Sorted Lists Easy Dummy node / tail pointer
Best Time to Buy and Sell Stock Easy Running minimum / max profit
Binary Search Easy Binary search
Group Anagrams Medium Frequency signature grouping
Two Sum II - Input Array Is Sorted Medium Opposite-end two pointers
Container With Most Water Medium Opposite-end two pointers
3Sum Medium Sorting / two pointers
Top K Frequent Elements Medium Frequency map / heap
Product of Array Except Self Medium Prefix/suffix products
Longest Substring Without Repeating Characters Medium Variable sliding window
Permutation in String Medium Fixed-size sliding window
Longest Repeating Character Replacement Medium Variable sliding window
Rotate Image Medium Matrix transforms
Valid Sudoku Medium Constraint tracking with sets
Longest Consecutive Sequence Medium Hash set / sequence starts
Encode and Decode Strings Medium Length-prefix encoding
Pow(x, n) Medium Divide and conquer
Reorder List Medium Linked lists / two pointers
Remove Nth Node From End of List Medium Linked list fast/slow pointers
Search a 2D Matrix Medium Binary search
Course Schedule Medium Graph DFS / cycle detection
Course Schedule II Medium Graph DFS / topological ordering
Walls and Gates Medium Multi-source grid BFS
Word Ladder Hard BFS / implicit graph
Trapping Rain Water Hard Two pointers / running maximums
Minimum Window Substring Hard Variable sliding window
Sliding Window Maximum Hard Monotonic deque
Implement Trie (Prefix Tree) Medium Trie / prefix tree
Find the Duplicate Number Medium Floyd's cycle detection
Car Fleet Medium Ordered sweep / monotonic state
Best Time to Buy and Sell Stock with Cooldown Medium DP / memoized state search

What This Shows

  • Clear problem decomposition under interview constraints.
  • Python implementations with time and space complexity.
  • Notes on mistakes and boundary cases, not only polished final code.
  • Small commits that show steady practice and reflection.

Workflow

  1. Create a new problem folder.
  2. Start your timer.
  3. Work in the problem folder and leave notes as you go.
  4. Commit when you finish or hit a useful stopping point.

Create A Problem Entry

python3 scripts/new_problem.py "Two Sum" easy

This creates a folder under problems/ with:

  • README.md for timing, notes, insights, and reflection.
  • solution.py for the main solution.
  • alternatives.md for other approaches you try later.

Commit Style

Use small commits so your GitHub activity tells the story:

git add .
git commit -m "Solve two sum"

For partial progress:

git commit -m "Work through two sum brute force"

About

Public LeetCode practice journal with Python solutions, complexity notes, pitfalls, and interview mental models.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages