Skip to content

ggauravky/leetcode-solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

165 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’» LeetCode Solutions Repository

Header

LeetCode Python VS Code Git

Daily Progress License Stars

🎯 A systematically organized collection of LeetCode solutions

πŸ“š Structured by Difficulty Level


πŸ“Š Solutions Table

# Problem Difficulty LeetCode Link Solution
1 Two Sum 🟒 Easy Link Solution
2 Add Two Numbers 🟑 Medium Link Solution
7 Reverse Integer 🟑 Medium Link Solution
9 Palindrome Number 🟒 Easy Link Solution
13 Roman to Integer 🟒 Easy Link Solution
14 Longest Common Prefix 🟒 Easy Link Solution
17 Letter Combinations of a Phone Number 🟑 Medium Link Solution
19 Remove Nth Node From End of List 🟑 Medium Link Solution
20 Valid Parentheses 🟒 Easy Link Solution
26 Remove Duplicates from Sorted Array 🟒 Easy Link Solution
27 Remove Element 🟒 Easy Link Solution
35 Search Insert Position 🟒 Easy Link Solution
39 Combination Sum 🟑 Medium Link Solution
46 Permutations 🟑 Medium Link Solution
50 Pow(x, n) 🟒 Easy Link Solution
53 Maximum Subarray 🟑 Medium Link Solution
54 Spiral Matrix 🟑 Medium Link Solution
58 Length of Last Word 🟒 Easy Link Solution
61 Rotate List 🟑 Medium Link Solution
66 Plus One 🟒 Easy Link Solution
69 Sqrt(x) 🟒 Easy Link Solution
75 Sort Colors 🟑 Medium Link Solution
83 Remove Duplicates from Sorted List 🟒 Easy Link Solution
88 Merge Sorted Array 🟒 Easy Link Solution
118 Pascal's Triangle 🟒 Easy Link Solution
119 Pascal's Triangle II 🟒 Easy Link Solution
121 Best Time to Buy and Sell Stock 🟒 Easy Link Solution
122 Best Time to Buy and Sell Stock II 🟑 Medium Link Solution
125 Valid Palindrome 🟒 Easy Link Solution
128 Longest Consecutive Sequence 🟒 Easy Link Solution
136 Single Number 🟒 Easy Link Solution
142 Linked List Cycle II 🟑 Medium Link Solution
160 Intersection of Two Linked Lists 🟒 Easy Link Solution
167 Two Sum II - Input Array Is Sorted 🟑 Medium Link Solution
169 Majority Element 🟒 Easy Link Solution
176 Second Highest Salary 🟑 Medium Link Solution
177 Nth Highest Salary 🟑 Medium Link Solution
178 Rank Scores 🟑 Medium Link Solution
183 Customers Who Never Order 🟒 Easy Link Solution
184 Department Highest Salary 🟑 Medium Link Solution
189 Rotate Array 🟑 Medium Link Solution
141 Linked List Cycle 🟒 Easy Link Solution
196 Delete Duplicate Emails 🟒 Easy Link Solution
202 Happy Number 🟒 Easy Link Solution
206 Reverse Linked List 🟒 Easy Link Solution
225 Implement Stack using Queues 🟒 Easy Link Solution
231 Power of Two 🟒 Easy Link Solution
232 Implement Queue using Stacks 🟒 Easy Link Solution
237 Delete Node in a Linked List 🟑 Medium Link Solution
242 Valid Anagram 🟒 Easy Link Solution
283 Move Zeroes 🟒 Easy Link Solution
287 Find the Duplicate Number 🟑 Medium Link Solution
412 Fizz Buzz 🟒 Easy Link Solution
451 Sort Characters By Frequency 🟑 Medium Link Solution
485 Max Consecutive Ones 🟒 Easy Link Solution
496 Next Greater Element I 🟒 Easy Link Solution
503 Next Greater Element II 🟑 Medium Link Solution
509 Fibonacci Number 🟒 Easy Link Solution
511 Game Play Analysis I 🟒 Easy Link Solution
586 Customer Placing the Largest Number of Orders 🟒 Easy Link Solution
595 Big Countries 🟒 Easy Link Solution
596 Classes With at Least 5 Students 🟒 Easy Link Solution
607 Sales Person 🟒 Easy Link Solution
682 Baseball Game 🟒 Easy Link Solution
704 Binary Search 🟒 Easy Link Solution
796 Rotate String 🟒 Easy Link Solution
844 Backspace String Compare 🟒 Easy Link Solution
876 Middle of the Linked List 🟒 Easy Link Solution
905 Sort Array By Parity 🟒 Easy Link Solution
977 Squares of a Sorted Array 🟒 Easy Link Solution
1050 Actors and Directors Who Cooperated At Least Three Times 🟒 Easy Link Solution
1108 Defanging an IP Address 🟒 Easy Link Solution
1137 N-th Tribonacci Number 🟒 Easy Link Solution
1148 Article Views I 🟒 Easy Link Solution
1280 Students and Examinations 🟒 Easy Link Solution
1378 Replace Employee ID With The Unique Identifier 🟒 Easy Link Solution
1480 Running Sum of 1d Array 🟒 Easy Link Solution
1484 Group Sold Products By The Date 🟒 Easy Link Solution
1517 Find Users With Valid E-Mails 🟒 Easy Link Solution
1523 Count Odd Numbers in an Interval Range 🟒 Easy Link Solution
1527 Patients With a Condition 🟒 Easy Link Solution
1550 Three Consecutive Odds 🟒 Easy Link Solution
1614 Maximum Nesting Depth of the Parentheses 🟒 Easy Link Solution
1667 Fix Names in a Table 🟒 Easy Link Solution
1672 Richest Customer Wealth 🟒 Easy Link Solution
1683 Invalid Tweets 🟒 Easy Link Solution
1693 Daily Leads and Partners 🟒 Easy Link Solution
1741 Find Total Time Spent by Each Employee 🟒 Easy Link Solution
1752 Check if Array Is Sorted and Rotated 🟒 Easy Link Solution
1757 Recyclable and Low Fat Products 🟒 Easy Link Solution
1795 Rearrange Products Table 🟒 Easy Link Solution
1822 Sign of the Product of an Array 🟒 Easy Link Solution
1873 Calculate Special Bonus 🟒 Easy Link Solution
1903 Largest Odd Number in String 🟒 Easy Link Solution
1907 Count Salary Categories 🟑 Medium Link Solution
2356 Number of Unique Subjects Taught by Each Teacher 🟒 Easy Link Solution
2620 Counter 🟒 Easy Link Solution
2621 Sleep 🟒 Easy Link Solution
2623 Memoize 🟑 Medium Link Solution
2626 Array Reduce Transformation 🟒 Easy Link Solution
2629 Function Composition 🟒 Easy Link Solution
2634 Filter Elements from Array 🟒 Easy Link Solution
2635 Apply Transform Over Each Element in Array 🟒 Easy Link Solution
2665 Counter II 🟒 Easy Link Solution
2666 Allow One Function Call 🟒 Easy Link Solution
2667 Create Hello World Function 🟒 Easy Link Solution
2703 Return Length of Arguments Passed 🟒 Easy Link Solution
2704 To Be Or Not To Be 🟒 Easy Link Solution
2715 Timeout Cancellation 🟒 Easy Link Solution
2723 Add Two Promises 🟒 Easy Link Solution
2942 Find Words Containing Character 🟒 Easy Link Solution
3232 Find if Digit Game Can Be Won 🟒 Easy Link Solution

πŸ“– About

This repository contains my journey through LeetCode problems, solving at least one problem daily. Each solution is carefully organized by difficulty level:

  • 🟒 Easy - Fundamental problems to build strong foundations
  • 🟑 Medium - Intermediate challenges requiring more complex thinking
  • πŸ”΄ Hard - Advanced problems testing deep algorithmic knowledge

πŸ—‚οΈ Repository Structure

πŸ“¦ leetcode-solutions/
β”‚
β”œβ”€β”€ πŸ“ EASY/
β”‚   └── 88 Easy problems solved
β”‚
β”œβ”€β”€ πŸ“ MEDIUM/
β”‚   └── 24 Medium problems solved
β”‚
β”œβ”€β”€ πŸ“ HARD/
β”‚   └── 0 Hard problems solved
β”‚
└── πŸ“„ README.md

πŸ“ˆ Progress Tracker

Difficulty Solved Percentage
🟒 Easy 88 Progress
🟑 Medium 24 Progress
πŸ”΄ Hard 0 Progress
Total 112 🎯

πŸ’‘ Problem Solving Approach

Each solution follows a structured format:

  1. Problem Statement - Clear description of the problem
  2. Approach - Explanation of the solution strategy
  3. Time Complexity - Big O notation for time
  4. Space Complexity - Big O notation for space
  5. Code - Clean, well-commented Python implementation

πŸ› οΈ Tech Stack

Category Tools
πŸ’» Language Python
πŸ”§ IDE VS Code
πŸ“Š Version Control Git GitHub

πŸŽ“ Learning Goals

  • βœ… Solve at least 1 problem daily
  • 🎯 Master core data structures and algorithms
  • πŸš€ Improve problem-solving speed and accuracy
  • πŸ’ͺ Build consistency and discipline
  • πŸ“š Document solutions for future reference

🀝 Contributing

Feel free to:

  • πŸ› Report bugs or issues
  • πŸ’‘ Suggest better approaches
  • ⭐ Star this repository if you find it helpful!

πŸ“¬ Connect With Me

GitHub LeetCode LinkedIn


πŸ“ License

This project is licensed under the MIT License - feel free to use these solutions for learning purposes!


πŸ’« Show Your Support

If you find this repository helpful, please consider:

Star Fork Follow


πŸ’­ Inspirational Quotes

"The only way to learn a new programming language is by writing programs in it."
β€” Dennis Ritchie

"First, solve the problem. Then, write the code."
β€” John Johnson


Footer

Happy Coding! πŸš€ | Keep Learning! πŸ“š | Never Give Up! πŸ’ͺ

About

A structured collection of LeetCode solutions implemented in Python. Covers core Data Structures and Algorithms (DSA) topics with optimized code for coding interviews.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages