Skip to content

Lntck/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

319 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LeetCode Solutions

πŸ“Œ My accepted solutions to LeetCode problems across multiple programming languages. I focus on writing efficient algorithms with optimal time and space complexity, alongside clean and readable code.

πŸš€ The Solutions Table below is generated automatically. A GitHub Action script scans the solution files in this repository, fetches problem details from the official LeetCode API, and updates this README every time code changes are pushed. This way, the table always reflects the latest accepted solutions β€” no manual updates needed!


Solutions Table

# Title Solution Difficulty
1 Two Sum C++ 🟒 Easy
2 Add Two Numbers Python 🟑 Medium
3 Longest Substring Without Repeating Characters Python 🟑 Medium
4 Median of Two Sorted Arrays Python πŸ”΄ Hard
6 Zigzag Conversion Python 🟑 Medium
9 Palindrome Number Python 🟒 Easy
11 Container With Most Water Python 🟑 Medium
12 Integer to Roman Python 🟑 Medium
13 Roman to Integer Python 🟒 Easy
14 Longest Common Prefix C++ 🟒 Easy
15 3Sum Python 🟑 Medium
17 Letter Combinations of a Phone Number Python 🟑 Medium
19 Remove Nth Node From End of List Python 🟑 Medium
20 Valid Parentheses Python 🟒 Easy
21 Merge Two Sorted Lists Python 🟒 Easy
22 Generate Parentheses Python 🟑 Medium
25 Reverse Nodes in k-Group Python πŸ”΄ Hard
26 Remove Duplicates from Sorted Array Python 🟒 Easy
27 Remove Element C++ 🟒 Easy
28 Find the Index of the First Occurrence in a String Python 🟒 Easy
30 Substring with Concatenation of All Words Python πŸ”΄ Hard
33 Search in Rotated Sorted Array Python 🟑 Medium
34 Find First and Last Position of Element in Sorted Array Python 🟑 Medium
35 Search Insert Position Python 🟒 Easy
36 Valid Sudoku Python 🟑 Medium
39 Combination Sum Python 🟑 Medium
42 Trapping Rain Water Python πŸ”΄ Hard
45 Jump Game II Python 🟑 Medium
46 Permutations Python 🟑 Medium
48 Rotate Image Python 🟑 Medium
49 Group Anagrams Python 🟑 Medium
52 N-Queens II Python πŸ”΄ Hard
53 Maximum Subarray Python 🟑 Medium
54 Spiral Matrix Python 🟑 Medium
55 Jump Game Python 🟑 Medium
56 Merge Intervals Python 🟑 Medium
57 Insert Interval Python 🟑 Medium
58 Length of Last Word Python 🟒 Easy
61 Rotate List Python 🟑 Medium
67 Add Binary Python 🟒 Easy
68 Text Justification Python πŸ”΄ Hard
69 Sqrt(x) Python 🟒 Easy
70 Climbing Stairs Python 🟒 Easy
71 Simplify Path Python 🟑 Medium
73 Set Matrix Zeroes Python 🟑 Medium
74 Search a 2D Matrix Python 🟑 Medium
76 Minimum Window Substring Python πŸ”΄ Hard
77 Combinations Python 🟑 Medium
79 Word Search Python 🟑 Medium
80 Remove Duplicates from Sorted Array II Python 🟑 Medium
82 Remove Duplicates from Sorted List II Python 🟑 Medium
86 Partition List Python 🟑 Medium
88 Merge Sorted Array C++ 🟒 Easy
92 Reverse Linked List II Python 🟑 Medium
98 Validate Binary Search Tree Python 🟑 Medium
100 Same Tree Python 🟒 Easy
101 Symmetric Tree Python 🟒 Easy
102 Binary Tree Level Order Traversal Python 🟑 Medium
103 Binary Tree Zigzag Level Order Traversal Python 🟑 Medium
104 Maximum Depth of Binary Tree Python 🟒 Easy
105 Construct Binary Tree from Preorder and Inorder Traversal Python 🟑 Medium
106 Construct Binary Tree from Inorder and Postorder Traversal Python 🟑 Medium
108 Convert Sorted Array to Binary Search Tree Python 🟒 Easy
112 Path Sum Python 🟒 Easy
114 Flatten Binary Tree to Linked List Python 🟑 Medium
117 Populating Next Right Pointers in Each Node II Python 🟑 Medium
118 Pascal's Triangle Python 🟒 Easy
119 Pascal's Triangle II Python 🟒 Easy
121 Best Time to Buy and Sell Stock Python 🟒 Easy
122 Best Time to Buy and Sell Stock II Python 🟑 Medium
124 Binary Tree Maximum Path Sum Python πŸ”΄ Hard
125 Valid Palindrome Python 🟒 Easy
127 Word Ladder Python πŸ”΄ Hard
128 Longest Consecutive Sequence Python 🟑 Medium
129 Sum Root to Leaf Numbers Python 🟑 Medium
130 Surrounded Regions Python 🟑 Medium
133 Clone Graph Python 🟑 Medium
134 Gas Station Python 🟑 Medium
135 Candy Python πŸ”΄ Hard
136 Single Number Python 🟒 Easy
138 Copy List with Random Pointer Python 🟑 Medium
139 Word Break Python 🟑 Medium
141 Linked List Cycle Python 🟒 Easy
146 LRU Cache Python 🟑 Medium
148 Sort List Python 🟑 Medium
150 Evaluate Reverse Polish Notation Python 🟑 Medium
151 Reverse Words in a String Python 🟑 Medium
153 Find Minimum in Rotated Sorted Array Python 🟑 Medium
155 Min Stack Python 🟑 Medium
162 Find Peak Element Python 🟑 Medium
167 Two Sum II - Input Array Is Sorted Python 🟑 Medium
169 Majority Element Python 🟒 Easy
173 Binary Search Tree Iterator Python 🟑 Medium
189 Rotate Array Python 🟑 Medium
190 Reverse Bits Python 🟒 Easy
191 Number of 1 Bits Python 🟒 Easy
198 House Robber Python 🟑 Medium
199 Binary Tree Right Side View Python 🟑 Medium
200 Number of Islands Python 🟑 Medium
202 Happy Number Python 🟒 Easy
205 Isomorphic Strings Python 🟒 Easy
206 Reverse Linked List Python 🟒 Easy
207 Course Schedule Python 🟑 Medium
208 Implement Trie (Prefix Tree) Python 🟑 Medium
209 Minimum Size Subarray Sum Python 🟑 Medium
210 Course Schedule II Python 🟑 Medium
211 Design Add and Search Words Data Structure Python 🟑 Medium
215 Kth Largest Element in an Array Python 🟑 Medium
219 Contains Duplicate II Python 🟒 Easy
222 Count Complete Tree Nodes Python 🟒 Easy
224 Basic Calculator Python πŸ”΄ Hard
226 Invert Binary Tree Python 🟒 Easy
228 Summary Ranges Python 🟒 Easy
230 Kth Smallest Element in a BST Python 🟑 Medium
232 Implement Queue using Stacks Python 🟒 Easy
236 Lowest Common Ancestor of a Binary Tree Python 🟑 Medium
238 Product of Array Except Self Java 🟑 Medium
242 Valid Anagram Python 🟒 Easy
268 Missing Number Python 🟒 Easy
274 H-Index C++ 🟑 Medium
283 Move Zeroes Python 🟒 Easy
289 Game of Life Python 🟑 Medium
290 Word Pattern Python 🟒 Easy
300 Longest Increasing Subsequence Python 🟑 Medium
322 Coin Change Python 🟑 Medium
347 Top K Frequent Elements Python 🟑 Medium
350 Intersection of Two Arrays II Python 🟒 Easy
380 Insert Delete GetRandom O(1) C++, Python 🟑 Medium
383 Ransom Note Python 🟒 Easy
392 Is Subsequence Python 🟒 Easy
399 Evaluate Division Python 🟑 Medium
433 Minimum Genetic Mutation Python 🟑 Medium
452 Minimum Number of Arrows to Burst Balloons Python 🟑 Medium
530 Minimum Absolute Difference in BST Python 🟒 Easy
560 Subarray Sum Equals K Python 🟑 Medium
637 Average of Levels in Binary Tree Python 🟒 Easy
674 Longest Continuous Increasing Subsequence Python 🟒 Easy
680 Valid Palindrome II Python 🟒 Easy
772 Construct Quad Tree Python 🟑 Medium
782 Jewels and Stones Python 🟒 Easy
932 Monotonic Array Python 🟒 Easy
945 Snakes and Ladders Python 🟑 Medium
954 Maximum Sum Circular Subarray Python 🟑 Medium
969 Number of Recent Calls Python 🟒 Easy
1019 Squares of a Sorted Array Python 🟒 Easy
1229 Shortest Path with Alternating Colors Python 🟑 Medium
1542 Consecutive Characters Python 🟒 Easy
1586 Longest Subarray of 1's After Deleting One Element Python 🟑 Medium
2886 Faulty Keyboard Python 🟒 Easy

Structure

algorithms/
β”œβ”€β”€ cpp/
β”‚   └── ...
β”œβ”€β”€ python/
β”‚   └── ...
└── java/
    └── ...

Contribution

Found a bug or have suggestions? Feel free to open an Issue or submit a Pull Request!


Contact

πŸ“§ Email: shafeev.dev@gmail.com πŸ”— LeetCode Profile: https://leetcode.com/u/Lntck/


Note about Automation

This repository features an automated workflow that:

  • Parses solution files in the algorithms/ folder,
  • Retrieves problem details (title, difficulty, problem ID) from the official LeetCode API,
  • Automatically updates this README's Solutions Table on every push.

This means the table you see here always reflects the latest solutions without manual edits! πŸš€


About

πŸ“š A continuously growing collection of my LeetCode solutions. This repository is powered by a custom GitHub Action that automatically fetches problem details and updates the solutions table (README), ensuring it's always up-to-date.

Topics

Resources

License

Stars

Watchers

Forks

Contributors