Giter Club home page Giter Club logo

leetcode's Introduction

Leetcode solutions for ๐Ÿš€ NeetCode.io

This repo hosts the solutions found on NeetCode.io including the solutions shown on the NeetCode YouTube channel. The site will periodically be updated with new solutions from this repo!


Solutions from these languages will be linked from NeetCode.io:

  • Python
  • C++
  • Java
  • Javascript

Solutions are also welcome for any other supported language on leetcode.com!

Contributing

Please read the contributing guidlines before opening a PR

To contribute, please fork this repo and open a PR adding a missing solution from the supported languages.

If you would like to have collaborator permissions on the repo to merge your own PRs or review others' PRs please let me know.

Credits

Missing Solutions

Arrays & Hashing

Problem C C++ C# GO Java JS Kotlin Python Ruby Rust Scala Swift TS
217 - Contains Duplicate
242 - Valid Anagram
โŒ
1299 - Replace Elements With Greatest Element On Right Side
โŒ
โŒ
โŒ
โŒ
392 - Is Subsequence
โŒ
โŒ
โŒ
โŒ
โŒ
58 - Length of Last Word
โŒ
โŒ
โŒ
โŒ
โŒ
1 - Two Sum
14 - Longest Common Prefix
โŒ
49 - Group Anagrams
โŒ
โŒ
118 - Pascals Triangle
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
27 - Remove Element
โŒ
โŒ
โŒ
โŒ
929 - Unique Email Addresses
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
205 - Isomorphic Strings
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
605 - Can Place Flowers
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
169 - Majority Element
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
496 - Next Greater Element I
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
724 - Find Pivot Index
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
448 - Find All Numbers Disappeared In An Array
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1189 - Maximum Number of Balloons
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
290 - Word Pattern
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
347 - Top K Frequent Elements
โŒ
โŒ
238 - Product of Array Except Self
โŒ
36 - Valid Sudoku
โŒ
โŒ
271 - Encode And Decode Strings
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
128 - Longest Consecutive Sequence
โŒ
โŒ
75 - Sort Colors
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
535 - Encode And Decode Tinyurl
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
554 - Brick Wall
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
122 - Best Time to Buy And Sell Stock II
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
560 - Subarray Sum Equals K
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1930 - Unique Length 3 Palindromic Subsequences
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1963 - Minimum Number of Swaps to Make The String Balanced
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
2001 - Number of Pairs of Interchangeable Rectangles
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
2002 - Maximum Product of The Length of Two Palindromic Subsequences
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
2017 - Grid Game
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
438 - Find All Anagrams In a String
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
28 - Find The Index of The First Occurrence In a String
โŒ
โŒ
280 - Wiggle Sort
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
179 - Largest Number
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
523 - Continuous Subarray Sum
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
838 - Push Dominoes
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
187 - Repeated Dna Sequences
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
380 - Insert Delete Get Random O(1)
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1461 - Check if a String Contains All Binary Codes of Size K
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
304 - Range Sum Query 2D Immutable
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
665 - Non Decreasing Array
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
41 - First Missing Positive
โŒ
โŒ
โŒ
โŒ
โŒ

Two Pointers

Problem C C++ C# GO Java JS Kotlin Python Ruby Rust Scala Swift TS
125 - Valid Palindrome
โŒ
680 - Valid Palindrome II
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1984 - Minimum Difference Between Highest And Lowest of K Scores
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
344 - Reverse String
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
88 - Merge Sorted Array
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
283 - Move Zeroes
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
26 - Remove Duplicates From Sorted Array
โŒ
167 - Two Sum II Input Array Is Sorted
โŒ
15 - 3Sum
18 - 4Sum
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
11 - Container With Most Water
โŒ
1498 - Number of Subsequences That Satisfy The Given Sum Condition
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
189 - Rotate Array
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1968 - Array With Elements Not Equal to Average of Neighbors
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
881 - Boats to Save People
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
42 - Trapping Rain Water
โŒ

Sliding Window

Problem C C++ C# GO Java JS Kotlin Python Ruby Rust Scala Swift TS
121 - Best Time to Buy And Sell Stock
โŒ
3 - Longest Substring Without Repeating Characters
424 - Longest Repeating Character Replacement
โŒ
โŒ
567 - Permutation In String
โŒ
โŒ
โŒ
โŒ
1838 - Frequency of The Most Frequent Element
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1888 - Minimum Number of Flips to Make The Binary String Alternating
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
209 - Minimum Size Subarray Sum
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
658 - Find K Closest Elements
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
76 - Minimum Window Substring
โŒ
โŒ
โŒ
239 - Sliding Window Maximum
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ

Stack

Problem C C++ C# GO Java JS Kotlin Python Ruby Rust Scala Swift TS
20 - Valid Parentheses
682 - Baseball Game
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
225 - Implement Stack Using Queues
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
155 - Min Stack
โŒ
โŒ
โŒ
โŒ
150 - Evaluate Reverse Polish Notation
โŒ
โŒ
22 - Generate Parentheses
โŒ
โŒ
โŒ
735 - Asteroid Collision
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
739 - Daily Temperatures
โŒ
โŒ
901 - Online Stock Span
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
853 - Car Fleet
โŒ
โŒ
โŒ
โŒ
โŒ
71 - Simplify Path
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
394 - Decode String
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
402 - Remove K Digits
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1209 - Remove All Adjacent Duplicates In String II
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
132 - 132 Pattern
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
895 - Maximum Frequency Stack
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
84 - Largest Rectangle In Histogram
โŒ
โŒ
โŒ

Binary Search

Problem C C++ C# GO Java JS Kotlin Python Ruby Rust Scala Swift TS
704 - Binary Search
โŒ
โŒ
โŒ
35 - Search Insert Position
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
374 - Guess Number Higher Or Lower
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
441 - Arranging Coins
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
977 - Squares of a Sorted Array
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
367 - Valid Perfect Square
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
74 - Search a 2D Matrix
โŒ
875 - Koko Eating Bananas
โŒ
โŒ
33 - Search In Rotated Sorted Array
153 - Find Minimum In Rotated Sorted Array
โŒ
981 - Time Based Key Value Store
โŒ
โŒ
โŒ
โŒ
โŒ
34 - Find First And Last Position of Element In Sorted Array
โŒ
1898 - Maximum Number of Removable Characters
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
116 - Populating Next Right Pointers In Each Node
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1268 - Search Suggestions System
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
410 - Split Array Largest Sum
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
4 - Median of Two Sorted Arrays

Linked List

Problem C C++ C# GO Java JS Kotlin Python Ruby Rust Scala Swift TS
206 - Reverse Linked List
โŒ
21 - Merge Two Sorted Lists
234 - Palindrome Linked List
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
203 - Remove Linked List Elements
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
83 - Remove Duplicates From Sorted List
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
160 - Intersection of Two Linked Lists
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
143 - Reorder List
โŒ
โŒ
โŒ
โŒ
19 - Remove Nth Node From End of List
138 - Copy List With Random Pointer
โŒ
โŒ
โŒ
2 - Add Two Numbers
141 - Linked List Cycle
โŒ
287 - Find The Duplicate Number
โŒ
โŒ
24 - Swap Nodes In Pairs
โŒ
148 - Sort List
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
86 - Partition List
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
61 - Rotate List
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
92 - Reverse Linked List II
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
622 - Design Circular Queue
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
147 - Insertion Sort List
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
146 - LRU Cache
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
23 - Merge K Sorted Lists
โŒ
25 - Reverse Nodes In K Group
โŒ
โŒ
โŒ
โŒ

Trees

Problem C C++ C# GO Java JS Kotlin Python Ruby Rust Scala Swift TS
94 - Binary Tree Inorder Traversal
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
226 - Invert Binary Tree
โŒ
โŒ
โŒ
104 - Maximum Depth of Binary Tree
โŒ
โŒ
543 - Diameter of Binary Tree
โŒ
โŒ
110 - Balanced Binary Tree
โŒ
โŒ
100 - Same Tree
โŒ
โŒ
572 - Subtree of Another Tree
โŒ
108 - Convert Sorted Array to Binary Search Tree
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
617 - Merge Two Binary Trees
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
112 - Path Sum
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
606 - Construct String From Binary Tree
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
235 - Lowest Common Ancestor of a Binary Search Tree
โŒ
โŒ
โŒ
102 - Binary Tree Level Order Traversal
โŒ
โŒ
โŒ
199 - Binary Tree Right Side View
โŒ
โŒ
โŒ
โŒ
1448 - Count Good Nodes In Binary Tree
โŒ
โŒ
โŒ
98 - Validate Binary Search Tree
โŒ
โŒ
โŒ
230 - Kth Smallest Element In a Bst
โŒ
โŒ
โŒ
105 - Construct Binary Tree From Preorder And Inorder Traversal
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
96 - Unique Binary Search Trees
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
129 - Sum Root to Leaf Numbers
โŒ
โŒ
โŒ
โŒ
337 - House Robber III
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
951 - Flip Equivalent Binary Trees
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1993 - Operations On Tree
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
894 - All Possible Full Binary Trees
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
513 - Find Bottom Left Tree Value
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
669 - Trim a Binary Search Tree
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
173 - Binary Search Tree Iterator
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
538 - Convert Bst to Greater Tree
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
124 - Binary Tree Maximum Path Sum
โŒ
โŒ
โŒ
297 - Serialize And Deserialize Binary Tree
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ

Tries

Problem C C++ C# GO Java JS Kotlin Python Ruby Rust Scala Swift TS
208 - Implement Trie Prefix Tree
โŒ
โŒ
211 - Design Add And Search Words Data Structure
โŒ
โŒ
โŒ
โŒ
212 - Word Search II
โŒ
โŒ
โŒ
โŒ
โŒ

Heap / Priority Queue

Problem C C++ C# GO Java JS Kotlin Python Ruby Rust Scala Swift TS
703 - Kth Largest Element In a Stream
โŒ
โŒ
โŒ
โŒ
โŒ
1046 - Last Stone Weight
โŒ
โŒ
โŒ
โŒ
โŒ
973 - K Closest Points to Origin
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
215 - Kth Largest Element In An Array
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
621 - Task Scheduler
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
355 - Design Twitter
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1834 - Single Threaded Cpu
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1845 - Seat Reservation Manager
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1882 - Process Tasks Using Servers
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1985 - Find The Kth Largest Integer In The Array
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
767 - Reorganize String
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1405 - Longest Happy String
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1094 - Car Pooling
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
295 - Find Median From Data Stream
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1383 - Maximum Performance of a Team
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ

Backtracking

Problem C C++ C# GO Java JS Kotlin Python Ruby Rust Scala Swift TS
78 - Subsets
โŒ
โŒ
39 - Combination Sum
โŒ
โŒ
โŒ
77 - Combinations
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
46 - Permutations
โŒ
โŒ
โŒ
90 - Subsets II
โŒ
โŒ
โŒ
โŒ
โŒ
40 - Combination Sum II
โŒ
โŒ
โŒ
โŒ
โŒ
47 - Permutations II
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
79 - Word Search
โŒ
โŒ
โŒ
โŒ
131 - Palindrome Partitioning
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
93 - Restore Ip Addresses
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
17 - Letter Combinations of a Phone Number
โŒ
โŒ
โŒ
โŒ
โŒ
473 - Matchsticks to Square
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1849 - Splitting a String Into Descending Consecutive Values
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1980 - Find Unique Binary String
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1239 - Maximum Length of a Concatenated String With Unique Characters
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
698 - Partition to K Equal Sum Subsets
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
51 - N Queens
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
52 - N Queens II
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ

Graphs

Problem C C++ C# GO Java JS Kotlin Python Ruby Rust Scala Swift TS
463 - Island Perimeter
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
953 - Verifying An Alien Dictionary
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
200 - Number of Islands
โŒ
โŒ
โŒ
133 - Clone Graph
โŒ
โŒ
โŒ
โŒ
695 - Max Area of Island
โŒ
โŒ
โŒ
โŒ
1905 - Count Sub Islands
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
417 - Pacific Atlantic Water Flow
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
130 - Surrounded Regions
โŒ
โŒ
โŒ
1466 - Reorder Routes to Make All Paths Lead to The City Zero
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
994 - Rotting Oranges
โŒ
โŒ
โŒ
โŒ
โŒ
286 - Walls And Gates
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
909 - Snakes And Ladders
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
752 - Open The Lock
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
802 - Find Eventual Safe States
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
207 - Course Schedule
โŒ
โŒ
โŒ
โŒ
โŒ
210 - Course Schedule II
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1958 - Check if Move Is Legal
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
934 - Shortest Bridge
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
684 - Redundant Connection
โŒ
โŒ
โŒ
โŒ
323 - Number of Connected Components In An Undirected Graph
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
261 - Graph Valid Tree
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1553 - Minimum Number of Days to Eat N Oranges
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
127 - Word Ladder
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ

Advanced Graphs

Problem C C++ C# GO Java JS Kotlin Python Ruby Rust Scala Swift TS
332 - Reconstruct Itinerary
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1584 - Min Cost to Connect All Points
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
743 - Network Delay Time
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
778 - Swim In Rising Water
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
269 - Alien Dictionary
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
787 - Cheapest Flights Within K Stops
โŒ
โŒ
โŒ
โŒ
โŒ

1-D Dynamic Programming

Problem C C++ C# GO Java JS Kotlin Python Ruby Rust Scala Swift TS
70 - Climbing Stairs
โŒ
746 - Min Cost Climbing Stairs
โŒ
198 - House Robber
213 - House Robber II
5 - Longest Palindromic Substring
647 - Palindromic Substrings
โŒ
โŒ
โŒ
โŒ
โŒ
91 - Decode Ways
โŒ
โŒ
โŒ
โŒ
322 - Coin Change
โŒ
โŒ
โŒ
โŒ
152 - Maximum Product Subarray
โŒ
โŒ
139 - Word Break
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
300 - Longest Increasing Subsequence
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
416 - Partition Equal Subset Sum
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
120 - Triangle
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
740 - Delete And Earn
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
256 - Paint House
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
377 - Combination Sum IV
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
279 - Perfect Squares
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1856 - Maximum Subarray Min Product
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
983 - Minimum Cost For Tickets
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
343 - Integer Break
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
673 - Number of Longest Increasing Subsequence
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
691 - Stickers to Spell Word
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ

2-D Dynamic Programming

Problem C C++ C# GO Java JS Kotlin Python Ruby Rust Scala Swift TS
62 - Unique Paths
โŒ
โŒ
โŒ
1143 - Longest Common Subsequence
โŒ
โŒ
โŒ
โŒ
309 - Best Time to Buy And Sell Stock With Cooldown
โŒ
โŒ
โŒ
518 - Coin Change II
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
494 - Target Sum
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
97 - Interleaving String
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
877 - Stone Game
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
64 - Minimum Path Sum
โŒ
โŒ
โŒ
โŒ
โŒ
329 - Longest Increasing Path In a Matrix
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
221 - Maximal Square
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
5782 - Maximum Alternating Subsequence Sum
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
115 - Distinct Subsequences
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
72 - Edit Distance
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1220 - Count Vowels Permutation
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
312 - Burst Balloons
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1866 - Number of Ways to Rearrange Sticks With K Sticks Visible
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
10 - Regular Expression Matching
โŒ
โŒ

Greedy

Problem C C++ C# GO Java JS Kotlin Python Ruby Rust Scala Swift TS
53 - Maximum Subarray
โŒ
โŒ
55 - Jump Game
โŒ
โŒ
45 - Jump Game II
โŒ
โŒ
โŒ
1871 - Jump Game VII
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
134 - Gas Station
โŒ
โŒ
โŒ
846 - Hand of Straights
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1423 - Maximum Points You Can Obtain From Cards
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1898 - Merge Triplets to Form Target Triplet
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
763 - Partition Labels
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
678 - Valid Parenthesis String
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1921 - Eliminate Maximum Number of Monsters
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1029 - Two City Scheduling
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ

Intervals

Problem C C++ C# GO Java JS Kotlin Python Ruby Rust Scala Swift TS
57 - Insert Interval
56 - Merge Intervals
โŒ
โŒ
โŒ
435 - Non Overlapping Intervals
โŒ
โŒ
โŒ
โŒ
โŒ
253 - Meeting Rooms
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
919 - Meeting Rooms II
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1288 - Remove Covered Intervals
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1851 - Minimum Interval to Include Each Query
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ

Math & Geometry

Problem C C++ C# GO Java JS Kotlin Python Ruby Rust Scala Swift TS
48 - Rotate Image
โŒ
โŒ
โŒ
โŒ
54 - Spiral Matrix
โŒ
โŒ
73 - Set Matrix Zeroes
โŒ
โŒ
202 - Happy Number
โŒ
โŒ
โŒ
66 - Plus One
โŒ
โŒ
โŒ
9 - Palindrome Number
โŒ
โŒ
263 - Ugly Number
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1260 - Shift 2D Grid
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
13 - Roman to Integer
โŒ
โŒ
12 - Integer to Roman
โŒ
50 - Pow(x, n)
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
43 - Multiply Strings
โŒ
โŒ
โŒ
โŒ
2013 - Detect Squares
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
1041 - Robot Bounded In Circle
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
6 - Zigzag Conversion
โŒ
โŒ
2028 - Find Missing Observations
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ

Bit Manipulation

Problem C C++ C# GO Java JS Kotlin Python Ruby Rust Scala Swift TS
136 - Single Number
โŒ
โŒ
191 - Number of 1 Bits
โŒ
338 - Counting Bits
โŒ
190 - Reverse Bits
โŒ
268 - Missing Number
โŒ
371 - Sum of Two Integers
โŒ
7 - Reverse Integer
67 - Add Binary
โŒ
โŒ
โŒ
โŒ
โŒ
โŒ

Need to update the README? Update the template instead.

leetcode's People

Contributors

ahmad-a0 avatar neetcode-gh avatar sharmatushar1 avatar ykhan799 avatar imaginate avatar loczek avatar mitchellirvin avatar maratkhakim avatar veerbia avatar unresolvedcold avatar aakhtar3 avatar tedtran2019 avatar julienchemillier avatar miladra avatar agnihotriketan avatar notauserx avatar udaygarg avatar anthonysim avatar r1cky0 avatar vitali-matteo avatar tharunkanna14 avatar mahim1997 avatar kc10201 avatar chriskheng avatar raven1233 avatar kciccolella avatar chandra9302 avatar th-blitz avatar voski avatar shrujankotturi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.