Welcome to my LeetCode solutions repository! This collection contains my solutions to various LeetCode problems, implemented in Python, focused on efficiency and clean code.
This repository is organized by problem number. Each directory corresponds to a specific LeetCode problem and contains the Python solution.
LEETCODE :
| Problem ID | Difficulty | Problem Description / Function Name | Solution Link |
|---|---|---|---|
| 1 | Two Sum | View Solution | |
| 7 | reverse integer | View Solution | |
| 9 | palindrome number | View Solution | |
| 15 | 3 sum | View Solution | |
| 16 | 3 sum closest | View Solution | |
| 18 | 4 sum | View Solution | |
| 26 | Remove Duplicates from Sorted Array | View Solution | |
| 27 | Remove Element | View Solution | |
| 50 | Pow(x, n) | View Solution | |
| 58 | length of last word | View Solution | |
| 75 | length of last word | View Solution | |
| 80 | Remove Duplicates from Sorted Array II | View Solution | |
| 121 | Best Time to Buy and Sell Stock | View Solution | |
| 122 | Best Time to Buy and Sell Stock II | View Solution | |
| 167 | Two Sum II - Input Array Is Sorted | View Solution | |
| 202 | happy number | View Solution | |
| 217 | contains duplicates | View Solution | |
| 219 | contains duplicates - II | View Solution | |
| 231 | Power of Two | View Solution | |
| 283 | Move Zeroes | View Solution | |
| 287 | return the duplicate value | View Solution | |
| 326 | Power of Three | View Solution | |
| 342 | Power of Four | View Solution | |
| 344 | reverse a string | View Solution | |
| 345 | reverse a all vowels in a string | View Solution | |
| 392 | is subsequence | View Solution | |
| 412 | Fizz Buzz | View Solution | |
| 485 | max consecutive one's | View Solution | |
| 509 | Fibonacci Number | View Solution | |
| 541 | Reverse string II | View Solution | |
| 557 | reverse wrods in a string III | View Solution | |
| 633 | sum of square numbers | View Solution | |
| 680 | valid palindrome II | View Solution | |
| 825 | friends of appropriate age | View Solution | |
| 905 | Sort Array By Parity | View Solution | |
| 922 | Sort Array By Parity II | View Solution | |
| 977 | squares of sorted array | View Solution | |
| 1137 | N-th Tribonacci Number | View Solution | |
| 1281 | Subtract Product and Sum of Digits | View Solution | |
| 1346 | check if N and its double exists | View Solution | |
| 1348 | Find the Distance Value Between Two Arrays | View Solution | |
| 1365 | Smaller Numbers Than Current | View Solution | |
| 1431 | Kids With the Greatest Number of Candies | View Solution | |
| 1480 | Running Sum of 1d Array | View Solution | |
| 1523 | Count Odd Numbers in an Interval | View Solution | |
| 1550 | Three Consecutive Odds | View Solution | |
| 1672 | Richest Customer Wealth | View Solution | |
| 1979 | GCD | View Solution | |
| 2000 | reverse the prefix of the word | View Solution | |
| 2511 | maximum enimies captured | View Solution | |
| 2520 | Count the Digits That Divide a Number | View Solution | |
| 2824 | count pairs whose sum is less than target | View Solution | |
| 2960 | Count Tested Devices After Test Ops | View Solution | |
| 3099 | Harshad Number | View Solution | |
| 3775 | reverse wordds with same vowel count | View Solution |
STRIVER'S SHEET:
| Problem ID | Difficulty | Problem Description / Function Name | Solution Link |
|---|---|---|---|
| 1 | count digits | View Solution | |
| 2 | revers integer (32-bit) | View Solution | |
| 3 | is palindrome | View Solution | |
| 4 | GCD | View Solution | |
| 6 | divisors of a number | View Solution |
- Language: Python 3.x
- Platform: LeetCode
- Clone the repository:
git clone https://github.com/your-username/LEETCODE.git
- Navigate to a specific problem:
cd LEETCODE/1 - Run the script:
python 1.py
- Total Problems Solved: 57
- Easy: 41
- Medium: 16
- Hard: 0
- Total Problems Solved: 05
- Easy: 05
- Medium: 0
- Hard: 0
Happy Coding! π