My Leetcode solution in python with clean and beginner-friendly code
- 🎓 B.E. Computer Science Engineering
- 💻 Learning Data Structures & Algorithms
- 🐍 Programming Language: Python
- 🎯 Goal : To become a software engineer with exceptional problem-solving skills by consistently mastering Data Structures & Algorithms, building impactful projects, and writing clean, efficient code.
| Solved | Easy | Medium | Hard |
|---|---|---|---|
| 85 | 72 | 13 | 0 |
- ✅ Arrays
- ✅ Hash Map
- ✅ Two Pointers
- ⏳ Binary Search
- ⏳ Stack
- ⏳ Queue
- ⏳ Linked List
My LeetCode solutions in Python with clean and beginner-friendly code.
| No | Problem | Difficulty | Pattern |
|---|---|---|---|
| 1 | Two Sum | Easy | Hash Map |
| 11 | Container With Most Water | Medium | Two Pointers |
| 26 | Remove Duplicates from Sorted Array | Easy | Two Pointers |
| 27 | Remove Element | Easy | Two Pointers |
| 35 | Search Insert Position | Easy | Binary Search |
| 66 | Plus One | Easy | Array, Simulation |
| 121 | Best Time to Buy and Sell Stock | Easy | Array, Greedy |
| 169 | Majority Element | Easy | Hash Map |
| 217 | Contains Duplicate | Easy | Hash Set |
| 283 | Move Zeroes | Easy | Two Pointers |
| 344 | Reverse String | Easy | Two Pointers |
| 724 | Find Pivot Index | Easy | Prefix Sum |
| 1929 | Concatenation Of Array | Easy | Array,Stimulation |
| 1470 | Shuffle the Array | Easy | Array |
| 485 | Max Consective Ones | Easy | Array |
| 1295 | Find Numbers With Even Number Of Digits | Easy | Array |
| 1920 | Build Array From Permutation | Easy | Array,Stimulation |
| 136 | Single Number | Easy | Array, Bit Manipulation |
| 448 | Find All Numbers Disappeared In An Array | Easy | Array, Hash Set |
| 414 | Third Maximum Number | Easy | Array,Sort |
| 69 | Sqrt(x) | Easy | Math,Binary Search |
| 268 | Missing Number | Easy | Array |
| 3536 | Maximum Product Of Two Digits | Easy | sort,Math |
| 349 | Intersection Of Two Array | Easy | Set,Hash |
| 709 | To Lower Case | Easy | String |
| 58 | Length Of Last Word | Easy | String |
| 2235 | Add Two Integers | Easy | Math |
| 2469 | Convert The Temperature | Easy | Math |
| 1672 | Richest Customer Wealth | Easy | Array , Matrix |
| 2011 | Final value of Variable After Performing Operations | Easy | Array |
| 1832 | Check if the Sentence is Pangram | Easy | Set ,Hash |
| 3731 | Find Missing Elements | Easy | Set , Hash |
| 1108 | Defanging An IP Address | Easy | String |
| 83 | Remove Duplicates from Sorted List | Easy | Linked list |
| 2413 | Smallest Even Multiple | Easy | Math, Number Theory |
| 125 | Valid Palindrome | Easy | Two pointer |
| 2996 | Smallest Missing Integer Greater Than Sequential Prefix Sum | Easy | set |
| 108 | Convert Sorted Array to Binary Search Tree | Easy | Tree |
| 1431 | Kids with The Greatest Number of Candies | Easy | Traversal |
| 412 | Fizz Buzz | Easy | String , Stimulation |
| 1436 | Destination City | Easy | Hashtable , string |
| 1342 | Number of steps to Reduce a Number to Zero | Easy | Math , Bit Manipultion |
| 1688 | Count Of Matches In Tournament | Easy | Math |
| 1450 | Number of Students Doing Homework at a Given Time | Easy | Array |
| 1512 | Number Of Good pairs | Easy | Hashtable, Array Traversal |
| 383 | Ransom Note | Easy | Hashmap , Frequency Count |
| 387 | First Unique Character in a String | Easy | Hashmap, Frequency count |
| 49 | Group Anagrams | Medium | Hashmap , Sorting |
| 219 | Contains Duplicate ll | Easy | Hashmap , Slindingwindow |
| 205 | Isomorphic Strings | Easy | Hashmap , Strings |
| 290 | Word Pattern | Easy | Hashmap , strings , Dictionary |
| 350 | Intersection of Two Arrays ll | Easy | Hashmap , two pointers |
| 451 | Sort Characters By Frequency | Medium | Hashtable , bucket sort , Counting |
| 1207 | Unique Number of Occurrences | Easy | Hashmap , set |
| 1128 | Number Of Equivalent Domino Pairs | Easy | Hash,list |
| 0013 | Roman To Integer | Easy | Dictionary , Brute Force |
| 3483 | Unique 3-Digit Even Numbers | Easy | Enumeration , loops concept |
| 228 | Summary ranges | Easy | String , List |
| 20 | Valid Parantheses | stack (LIFO) | |
| 525 | Contiguous Array | Medium | Hash , Dict , prefix sum |
| 447 | Number Of Boomerangs | Medium | HAsh, Pairs, Frequency |
| 14 | Longest Common prefix | Easy | Traversal , Pyfunc |
| 3498 | Reverse Degree of a String | Easy | Brute, Ord() |
| 3550 | Smallest Index With Digit Sum Equal To Index | Easy | Array , math |
| 554 | Brick Wall | Medium | Hashap , Prefix Sum |
| 202 | Happy Number | Easy | Floyd's Cycle Finding Algorithm, Hash |
| 231 | Power Of Two | Easy | Recursive , Math |
| 1614 | Maximum Nesting Depth of the Parentheses | Easy | Stack , Bracket Sequence |
| 28 | Find the Index of the First Occurrence in a String | Easy | Boyer–Moore String-Search Algorithm, Knuth–Morris–Pratt Algorithm, Z Algorithm |
| 392 | Is Subsequence | Easy | Two Pointers |
| 167 | Two Sum II - Input Array Is Sorted | Medium | Two Pointer , Binary Covering |
| 70 | Climbing Stair | Easy | Math |
| 118 | Pascal's Triangle | Easy | Dynamic Progmme |
| 1021 | Remove Outermost Parentheses | Easy | String , Bracket Sequence |
| 1876 | Substrings of Size Three with Distinct Characters | Easy | Sliding Window |
| 75 | Sort Colors | Medium | Sorting,array |
| 1732 | Find the Highest Altitude | Easy | Prefix sum , Array |
| 80 | Remove Duplicates from Sorted Array II | Medium | Two Pointers , Array |
| 15 | 3 Sum | Medium | Two Pointers SOrting |
| 16 | 3 Sum Closest | Medium | Two pointers, abs |
| 1385 | Find the Distance Value Between Two Arrays | Easy | Two Pointers ,array |
| 18 | 4Sum | Medium | Two pointers , sort |
| 581 | Shortest Unsorted Continuous Subarray | Medium | Two Pointers , Array |
| 844 | Backspace String Compare | Easy | String , Two Pointers |
| 3105 | Longest Strictly Increasing or Strictly Decreasing Subarray | Easy | Array , Two pointers |
I solve at least one LeetCode problem every day and upload the solution here.