Swift Notebook
A collection of my LeetCode solutions and syntax notes.
Quick Reference
The specific Swift syntax patterns I use for coding interviews.
View Quick ReferenceSolved Problems
| Status | Problem Name | Topic | Key Concept |
|---|---|---|---|
| Easy | Two Sum | Arrays & Hashing | Dictionary lookup for O(1) |
| Medium | Add Two Numbers | Linked Lists | Carry logic & Traversal |
| Medium | Longest Substring Without Repeating Characters | Sliding Window | Set & Pointer manipulation |
| Medium | Reverse Integer | Math | Modulo arithmetic & Overflow safety |
| Medium | Container With Most Water | Two Pointers | Greedy approach |
| Medium | Letter Combinations of a Phone Number | Backtracking | DFS & String building |
| Easy | Valid Parentheses | Stack | Matching pairs & Stack operations |
| Easy | Merge Two Sorted Lists | Linked Lists | Two pointers & Merge logic |
| Medium | Group Anagrams | Arrays & Hashing | String sorting as key |
| Medium | Merge Intervals | Intervals | Sorting & Overlap detection |
| Easy | Plus One | Arrays | Carry propagation |
| Easy | Maximum Depth of Binary Tree | Tree | DFS recursion |
| Easy | Best Time to Buy and Sell Stock | Arrays | Track min & max profit |
| Easy | Valid Palindrome | Two Pointers | Character validation & Pointers |
| Medium | Min Stack | Stack | O(1) min tracking |
| Medium | Binary Tree Right Side View | Tree | BFS level traversal |
| Easy | Contains Duplicate | Arrays & Hashing | Set lookup |
| Easy | Invert Binary Tree | Tree | Post-order swap |
| Easy | Diameter of Binary Tree | Tree | DFS & Path length tracking |