This repository is a collection of Python solutions to various LeetCode problems, designed to:
- Enhance problem-solving skills.
- Prepare for technical interviews.
- Explore different approaches to solve the same problem in an optimal way.
- Deep dive into data structures and algorithm and consolidate each uses of them.
- Clear and concise code: Solutions prioritize clarity and readability, making them easy to understand and learn from. Detailed explanations: Comments within the code provide explanations for specific logic and solutions.
- Modular structure: Solutions are organized in a well-structured manner, promoting code maintainability and reusability.
- Efficiency considerations: Solutions often explore trade-offs between time and space complexity to enhance their performance.
- This repository can be used as a personal index to collect your LeetCode solutions. It's a great way to track your progress, revisit solutions for reference, and solidify your understanding of common problem-solving patterns.
- Feel free to submit pull requests for new or improved solutions.
- Improve code and comments readability.
- Clarify comments within the code to explain the logic.
- This project is licensed under the MIT License - see the LICENSE file for details.
- 1. Two Sum
- 26. Remove Duplicates from Sorted Array
- 58. Length of Last Word
- 69. sqrt(x)
- 104. Maximum Depth of Binary Tree
- 169. Majority Element
- 205. Isomorphic Strings
- 206. Reverse Linked List
- 217. Contains Duplicate
- 234. Palindrome Linked List
- 242. Valid Anagram
- 283. Move Zeroes
- 345. Reverse Vowels of a String
- 392. Is Subsequence
- 404. Sum of Left Leaves
- 463. Island Perimeter
- 605. Can Place Flowers
- 643. Maximum Average Subarray I
- 705. Design HashSet
- 724. Find Pivot Index
- 872. Leaf-Similar Trees
- 933. Number Of Recent Calls
- 1071. Greatest Common Divisor Of Strings
- 1137. N-th Tribonacci Number
- 1207. Unique Number Of Occurrences
- 1299. Replace Elements with Greatest Element on Right Side
- 1431. Kids With The Greatest Number Of Candies
- 1544. Make The String Great
- 1614. Maximum Nesting Depth of the Parentheses
- 1700. Number of Students Unable to Eat Lunch
- 1732. Find The Highest Altitude
- 1768. Merge String Alternatively
- 1929. Concatenation of Array
- 1971. Find if Path Exists in Graph
- 2000. Reverse Prefix of Word
- 2073. Time Needed to Buy Tickets
- 2215. Find The Difference Of Two Arrays
- 2441. Largest Positive Integer That Exists With Its Negative
- 11. Container With Most Water
- 19. Remove Nth Node From End Of List
- 57. Insert Interval
- 79. Word Search
- 129. Sum Root to Leaf Numbers
- 143. Reorder List
- 151. Reverse Words In A String
- 198. House Robber
- 200. Number of Islands
- 237. Delete Node in a Linked List
- 238. Product Of Array Except Self
- 287. Find The Duplicate Number
- 328. Odd Even Linked List
- 334. Increasing Triplet Subsequence
- 394. Decode String
- 402. Remove K Digits
- 435. Non Overlapping Intervals
- 442. Find All Duplicates In An Array
- 443. String Compression
- 452. Minimum Number Of Arrows To Burst Balloons
- 621. Task Scheduler
- 623. Add One Row to Tree
- 678. Valid Parenthesis String
- 713. Subarray Product Less Than K
- 735. Asteroid Collision
- 950. Reveal Cards In Increasing Order
- 988. Smallest String Starting From Leaf
- 1004. Max Consecutive Ones III
- 1249. Minimum Remove to Make Valid Parentheses
- 1456. Maximum Number of Vowels in a Substring of Given Length
- 1493. Longest Subarray of 1's After Deleting One Element
- 1657. Determine If Two Strings Are Close
- 1669. Merge In Between Linked Lists
- 1679. Max Number of K-Sum Pairs
- 2095. Delete the Middle Node of a Linked List
- 2352. Equal Row And Column Pairs
- 2370. Longest Ideal Subsequence
- 2390. Removing Stars From A String
- 2958. Length of Longest Subarray With at Most K Frequency
- 2962. Count Subarrays Where Max Element Appears at Least K Times