This repo contains my daily DSA practice from LeetCode, with real-life examples and clean Python solutions.
# | Problem Title | Level | Topics | Code Link |
---|---|---|---|---|
1 | Remove Element (27) | Easy | Arrays, Two Pointers | Code |
2 | Merge Sorted Array (88) | Easy | Arrays, Two Pointers | Code |
3 | Remove Duplicates from Sorted Array | Easy | Arrays, Two Pointers | Code |
4 | Remove Duplicates II from Sorted Array (80) | Medium | Arrays, Two Pointers | Code |
5 | Product of Array Except Self (238) | Medium | Prefix, Arrays | Code |
6 | Gas Station (134) | Medium | Greedy | Code |
7 | Candy (135) | Hard | Greedy | Code |
8 | Trapping Rain Water (42) | Hard | Two Pointers, Stack | Code |
9 | Roman to Integer (13) | Easy | HashMap, Greedy | Code |
10 | Integer to Roman (12) | Medium | Greedy, Arrays | Code |
11 | Length of Last Word (58) | Easy | Strings | Code |
12 | Longest Common Prefix (14) | Easy | Strings | Code |
13 | Reverse Words in a String (151) | Medium | Strings | Code |
14 | Zigzag Conversion (6) | Medium | Strings, Simulation | Code |
15 | Find Index of First Occurrence in String (28) | Easy | Strings | Code |
16 | Text Justification (68) | Hard | Strings, Formatting | Code |
17 | Jump Game I (55) | Medium | Greedy, DP | Code |
18 | Jump Game II (45) | Medium | Greedy | Code |
19 | H-Index (274) | Medium | Sorting | Code |
20 | Insert Delete GetRandom O(1) (380) | Medium | HashMap, Design | Code |
21 | Valid Palindrome (125) | Easy | Two Pointers, String | Code |
22 | Is Subsequence (392) | Easy | Two Pointers, String | Code |
23 | Two Sum II - Input Array Is Sorted (167) | Easy | Two Pointers | Code |
24 | Container With Most Water (11) | Medium | Two Pointers | Code |
25 | 3Sum (15) | Medium | Two Pointers, Sorting | Code |
26 | Best Time to Buy and Sell Stock (121) | Easy | Greedy | Code |
27 | Best Time to Buy and Sell Stock II (122) | Medium | Greedy | Code |
28 | Majority Element (169) | Easy | HashMap, Voting Algorithm | Code |
29 | Minimum Size Subarray Sum (209) | Medium | Two Pointers | Code |
30 | Longest Substring Without Repeating Characters (3) | Medium | HashMap, Sliding Window | Code |
31 | Substring with Concatenation of All Words (30) | Hard | HashMap, Sliding Window | Code |
32 | Minimum Window Substring (76) | Hard | Sliding Window, HashMap | Code |
33 | Rotate Array (189) | Medium | Arrays, Rotation | Code |
34 | Valid Sudoku (36) | Medium | Hashing, Matrix | Code |
35 | Spiral Matrix (54) | Medium | Matrix, Simulation | Code |
36 | Rotate Matrix (Custom) | Medium | Matrix, In-place | Code |
37 | Set Matrix Zeroes (73) | Medium | Matrix | [Code](day27/Set Matrix Zeroes.py) |
38 | Game of Life (289) | Medium | Matrix, Simulation, In-place | [Code](day28/Game of Life.py) |
39 | Ransom Note (383) | Easy | Hashing, String | [Code](day29/Ransom Note.py) |
40 | Isomorphic Strings (205) | Easy | HashMap, String | [Code](day30/Isomorphic Strings.py) |
41 | Word Pattern (290) | Easy | HashMap, String | [Code](day31/Word Pattern.py) |
42 | Valid Anagram (242) | Easy | HashMap, String, Sorting | Code |
43 | Group Anagrams (49) | Medium | HashMap, String, Sorting | [Code](day33/Group Anagrams.py) |
45 | Happy Number (202) | Easy | Hashing, Math | [Code](day34/Happy Number.py) |
Each folder is organized as:
πΉ Problem: Check if two strings are isomorphic.
πΉ Approach: Use a hashmap to track character mappings.
πΉ Real-Life Example: Comparing two secret codes to see if they follow the same pattern.
- Solve 1 problem every day
- Add real-world relatable examples
- Maintain clean & structured code
- Clone the repo:
git clone https://github.com/<your-username>/leetcode-daily-practice.git