Loading repository dataβ¦
Loading repository dataβ¦
sayyedrabeeh / repository
A well-organized collection of 50+ LeetCode problems solved in Python with clear explanations, edge case handling, and complexity analysis. Includes categorized solutions for arrays, strings, dynamic programming, recursion, greedy algorithms, and more. Ideal for coding interview prep, Python learners, and contributors. π β Beginner to Advanced
Welcome to my comprehensive collection of LeetCode problems and Python programming solutions. This repository serves as both a personal archive of my coding journey and a resource for fellow programmers seeking to improve their problem-solving skills.
Each solution is meticulously documented with:
Whether you're preparing for technical interviews, improving your algorithmic thinking, or simply looking to practice Python programming, this repository aims to be a valuable resource in your learning journey.
The repository is organized into individual problem directories, each containing:
repository-root/
β
β βββ problem-1/
β β βββ solution.py
β β
β β
β βββ problem-2/
β βββ solution.py
β
| Problem Directory | Difficulty | Topics | Description |
|---|---|---|---|
buildArray-in-leetcode-main | Easy | Arrays | Array manipulation problem |
kidsWithCandies-in-leetcode-main | Easy | Arrays | Distribution algorithm |
numIdenticalPairs-in-leetcode-main | Easy | Arrays, Hash Table | Finding identical pairs |
numberOfEmployeesWhoMetTarget-in-leetcode-main | Easy | Arrays | Employee performance evaluation |
smallerNumbersThanCurrent-in-leetcode-main | Easy | Arrays, Sorting | Count smaller elements |
serch-insert-position-leetcode-main | Easy | Binary Search | Position finding algorithm |
maxProductDifference-main | Easy | Arrays, Math | Maximum product difference calculation |
minimumOperations-main | Medium | Greedy | Optimization problem |
climbing-stair--main | Easy | Dynamic Programming | Classic DP problem |
list-sort-main: Different sorting techniques for listsclear-a-list-main: Methods to clear or reset listscopy-of-list-in-in-python-main: Deep vs shallow copy operationsexist-in-a-list-in-in-python-main: Checking for element existencemerge-two-dict-main: Techniques to merge dictionariesmax-in-dict-main: Finding maximum values in dictionariesmin-in-dict-in-python-main: Finding minimum values in dictionariesdict-sort-by-key-main: Sorting dictionaries by keysdict-sort-by-value-in-python-main: Sorting dictionaries by valuesreverse-a-dict.-main: Reversing key-value pairssum-of-dict-main: Summing dictionary valuesreverse-a-string-main: String reversal techniquesto-lowercase-main: Case conversion methodswithout-vowel-main: String manipulation removing vowelslower-case-main: Lowercase operationscount-of-digits-in-python-main: Digit counting techniquesdigit-sum-main: Summing digits in numbersfizzbuzz-main: Classic FizzBuzz implementationcommon-factor-in-python-main: Finding common factorslist-sort-main: Various sorting algorithmsmin-number-main: Finding minimum valuessmallest-even-numbers-main: Conditional minimum findingrecursion--main: Recursive algorithm implementationsgenerator-main: Python generator functions and expressionsconvert-list-to-dict-main: Data structure conversionavg--n-list-number-main: Average calculation examplesavg-of-even--number-main: Conditional average calculationsquare-even-odd-cube-main: Applying different operations based on conditionspyramid-traingle-main: Triangle pattern printinginvert-pyramid-main: Inverted pattern printingright-angle-main: Right-angled triangle patternsMy solutions generally follow these principles:
Most solutions are implemented in Python 3, taking advantage of:
Each solution includes a detailed analysis of:
I welcome contributions to this repository! Here's how you can help:
Add New Problems:
Improve Existing Solutions:
Fix Issues:
Pull Request Process:
git checkout -b feature/amazing-solution)git commit -m 'Add solution for Problem X')git push origin feature/amazing-solution)To complement the solutions in this repository, here are some recommended resources:
Books:
Online Platforms:
YouTube Channels:
Q: Why are some solutions missing explanations? A: I'm continually updating the repository. If you find a solution without an explanation, feel free to contribute!
Q: How do I request a specific problem solution? A: Open an issue with the problem link and details.
Q: Can I use these solutions in interviews? A: These solutions are for learning purposes. In interviews, it's important to understand the approach rather than memorizing solutions.
Q: How often is this repository updated? A: I try to add new solutions regularly, typically adding 5-10 new problems each month.
If you find this repository helpful, please consider giving it a star! Your support encourages me to keep adding more solutions and improving existing ones.
Happy Coding! π
| Problem Name | Difficulty |
|---|---|
| 0112-path-sum | |
| 0144-binary-tree-preorder-traversal | Easy |
| Problem Name | Difficulty |
|---|---|
| 0112-path-sum | |
| 0144-binary-tree-preorder-traversal | Easy |
| Problem Name | Difficulty |
|---|---|
| 0112-path-sum |
| Problem Name | Difficulty |
|---|---|
| 0112-path-sum | |
| 0144-binary-tree-preorder-traversal | Easy |
| Problem Name | Difficulty |
|---|---|
| 2815-max-pair-sum-in-an-array | Easy |
| 3005-count-elements-with-maximum-frequency | Easy |
| Problem Name | Difficulty |
|---|---|
| 2815-max-pair-sum-in-an-array | Easy |
| 3005-count-elements-with-maximum-frequency | Easy |
| Problem Name | Difficulty |
|---|---|
| 3005-count-elements-with-maximum-frequency | Easy |
| Problem Name | Difficulty |
|---|---|
| 0144-binary-tree-preorder-traversal | Easy |