Welcome to my LeetCode Python Solutions repository! Here, you'll find my solutions to various LeetCode problems implemented in Python.
I'm dedicated to solving LeetCode problems using the Python programming language. This repository serves as a collection of my solutions, providing a reference for others and showcasing my problem-solving skills.
- Each problem solution is organized in its dedicated folder.
- The folder name corresponds to the problem's title.
- Inside each folder, you'll find the Python script containing the solution.
Feel free to explore the folders to find solutions to specific problems. Each Python script is thoroughly commented to explain the thought process and approach used to solve the problem.
This project is licensed under the MIT License - see the LICENSE file for details.
- Concatenation of Array
- Build Array from Permutation
- Number of Good Pairs
- Final Value of Variable After Performing Operations
- Shuffle the Array
- Find Words Containing Character
- Widest Vertical Area Between Two Points Containing No Points
- Richest Customer Wealth
- Kids With the Greatest Number of Candies
- Number of Employees Who Met the Target
- Count Pairs Whose Sum is Less than Target
- Running Sum of 1d Array
- How Many Numbers Are Smaller Than the Current Number
- Maximum Number of Words Found in Sentences
- Sum of Values at Indices With K Set Bits
- Decode XORed Array
- Left and Right Sum Differences
- Minimum Number Game
- Create Target Array in the Given Order
- Decompress Run-Length Encoded List
- Check If Two String Arrays are Equivalent
- Count Items Matching a Rule
- Shuffle String
- Truncate Sentence
- Find First Palindromic String in the Array
- Difference Between Element Sum and Digit Sum of an Array
- Number of Arithmetic Triplets
- Count Number of Pairs With Absolute Difference K
- Sum of All Odd Length Subarrays
- Count the Number of Consistent Strings
- Defanging an IP Address
- Find All People With Secret
- Jewels and Stones
- Cheapest Flights Within K Stops
- Find the Town Judge
- Greatest Common Divisor Traversal
- Largest Local Values in a Matrix
- Find the Highest Altitude
- Check if a String Is an Acronym of Words
- Maximum Product Difference Between Two Pairs
- Diameter of Binary Tree
- Two Sum
- Find Bottom Left Tree Value
- Sort the People
- Palindrome Number
- Matrix Diagonal Sum
- Same Tree
- To Lower Case
- Subarrays Distinct Element Sum of Squares I
- Sum of All Subset XOR Totals
- Even Odd Tree
- Count Good Triplets
- Flipping an Image
- Maximum Odd Binary Number
- Count Tested Devices After Test Operations
- Squares of a Sorted Array
- Sum of Squares of Special Elements
- Remove Nth Node From End of List
- Count Equal and Divisible Pairs in an Array
- Find Maximum Number of String Pairs
- Separate the Digits in an Array
- Roman to Integer
- DI String Match
- Find the Difference of Two Arrays
- Find Maximum Number of String Pairs
- Array Partition
- Bag of Tokens
- Goal Parser Interpretation
- Maximum Sum With Exactly K Elements
- Remove Palindromic Subsequences
- Design an Ordered Stream
- Maximum Product Difference Between Two Pairs
- Minimum Number of Moves to Seat Everyone
- Find Common Elements Between Two Arrays
- Minimum Operations to Exceed Threshold Value I
- Cells with Odd Values in a Matrix
- Sort Integers by The Number of 1 Bits
- Counting Words With a Given Prefix
- Delete Greatest Value in Each Row
- Find Greatest Common Divisor of Array
- Final Prices With a Special Discount in a Shop
- Count Negative Numbers in a Sorted Matrix
- Find Numbers with Even Number of Digits
- Sum of Unique Elements
- Unique Number of Occurrences
- Neither Minimum nor Maximum
- N-Repeated Element in Size 2N Array
- Height Checker
- Find the Peaks
- Sort Array By Parity
- Sort Array By Parity
- Number of Senior Citizens
- Find Target Indices After Sorting Array
- Points That Intersect With Cars
- Baseball Game
- Minimum Length of String After Deleting Similar Ends
- Decode the Message
- Find N Unique Integers Sum up to Zero
- Minimum Operations to Make the Array Increasing
- Replace All Digits with Characters
- Sorting the Sentence
- Split a String in Balanced Strings
- Number of Students Doing Homework at a Given Time
- Ant on the Boundary
- Middle of the Linked List
- Split Strings by Separator
- Count Elements With Maximum Frequency
- Maximum Strong Pair XOR I
- Minimum Common Value
- Letter Combinations of a Phone Number
- Generate Parentheses
- Symmetric Tree
- Combination Sum
- Longest Common Prefix
- Intersection of Two Arrays
- Permutations
- Merge Similar Items
- Maximum Number of Pairs in Array
- Maximum Units on a Truck
- Merge Sorted Array
- Best Time to Buy and Sell Stock
- Majority Element
- Transpose Matrix
- Remove Zero Sum Consecutive Nodes from Linked List
- N-Queens
- Subsets
- Binary Tree Inorder Traversal
- Single Number
- Move Zeroes
- Convert Sorted Array to Binary Search Tree
- Pascal's Triangle
- Find the Pivot Integer
- Find the Index of the First Occurrence in a String
- Binary Subarrays With Sum
- Valid Palindrome
- Is Subsequence
- Climbing Stairs
- Merge Two Sorted Lists
- Modify the Matrix
- Next Greater Element I
- Binary Subarrays With Sumvv
- Maximum Depth of Binary Tree
- Product of Array Except Self
- Contiguous Array
- Destination City
- Split Strings by Separator
- Make Array Zero by Subtracting Equal Amounts
- Most Common Word
- Insert Interval
- Valid Anagram
- Word Search
- Number of Students Unable to Eat Lunch
- Check if the Sentence Is Pangram
- Rings and Rods
- Two Out of Three
- Check if All Characters Have Equal Number of Occurrences
- Find the Distinct Difference Array
- First Letter to Appear Twice
- Ransom Note
- Contains Duplicate II
- Existence of a Substring in a String and Its Reverse
- Count Substrings Starting and Ending with Given Character
- Minimum Deletions to Make String K-Special
- Merge In Between Linked Lists
- Find Missing and Repeated Values
- Reverse Words in a String III
- Cells in a Range on an Excel Sheet
- Row With Maximum Ones
- Find the K-or of an Array
- Count Prefixes of a Given String
- Find Champion I
- Merge Two 2D Arrays by Summing Values
- Smallest Index With Equal Value
- Number of Unequal Triplets in Array
- Reverse Linked List
- Split the Array
- Find Pivot Index
- Plus One
- Distribute Candies
- Minimize String Length
- Divide Array Into Equal Pairs
- Maximum Number of Balls in a Box
- Check if Number Has Equal Digit Count and Digit Value
- Maximum Number of Words You Can Type
- Kth Distinct String in an Array
- Top K Frequent Elements
- Longest Palindromic Substring
- Minimum Sum of Four Digit Number After Splitting Digits
- Maximum 69 Number
- Lexicographically Smallest Palindrome
- Maximum Units on a Truck
- Longest Common Suffix Queries
- Most Frequent IDs
- Apply Operations to Make Sum of Array Greater Than or Equal to k
- Maximum Length Substring With Two Occurrences
- Find the Duplicate Number
- Buy Two Chocolates
- First Missing Positive
- Subarray Product Less Than K
- Valid Parentheses
- Remove Element
- Remove Duplicates from Sorted Array
- Subarrays with K Different Integers
- Count Subarrays With Fixed Bounds
- Length of Last Word
- Isomorphic Strings
- Convert Binary Number in a Linked List to Integer
- Winner of the Linked List Game
- Remove Linked List Elements
- Minimum Time Visiting All Points
- Trapping Rain Water
- Number Of Rectangles That Can Form The Largest Square