Skip to content

Amine0008/leetcodeProblems

Β 
Β 

Repository files navigation

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, Java, JavaScript, C++, Go, Swift, C#, TypeScript, Rust, Kotlin, Ruby, C, Scala and Dart

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 DONE C++ C# Dart GO Java JS Kotlin Python Ruby Rust Scala Swift TS
0912 - Sort an Array
βœ…
❌
❌
❌
❌
❌
❌
0347 - Top K Frequent Elements
βœ…
❌
0238 - Product of Array Except Self
βœ…
❌
❌
0036 - Valid Sudoku
βœ…
❌
0271 - Encode and Decode Strings
❌
❌
❌
0128 - Longest Consecutive Sequence
βœ…
❌
❌
0075 - Sort Colors
βœ…
❌
❌
❌
0535 - Encode and Decode TinyURL
βœ…
❌
❌
❌
❌
0554 - Brick Wall
βœ…
❌
❌
❌
❌
❌
❌
❌
0122 - Best Time to Buy And Sell Stock II
βœ…
❌
❌
❌
❌
❌
❌
0560 - 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
❌
❌
❌
❌
❌
❌
❌
❌
❌
0438 - Find All Anagrams in a String
❌
❌
❌
❌
❌
❌
0028 - Find The Index of The First Occurrence in a String
❌
❌
❌
❌
❌
❌
❌
0280 - Wiggle Sort
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0179 - Largest Number
❌
0523 - Continuous Subarray Sum
❌
❌
❌
❌
❌
❌
❌
❌
0838 - Push Dominoes
❌
❌
❌
❌
❌
❌
❌
❌
❌
0187 - Repeated DNA Sequences
❌
❌
❌
❌
❌
❌
❌
❌
0380 - Insert Delete Get Random O(1)
❌
❌
❌
❌
❌
❌
1461 - Check if a String Contains all Binary Codes of Size K
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0304 - Range Sum Query 2D Immutable
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0665 - Non Decreasing Array
❌
❌
❌
❌
❌
❌
0041 - First Missing Positive
❌
❌
❌
❌
❌
❌
❌
❌
1822 - Sign of An Array
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2215 - Find the Difference of Two Arrays
❌
❌
❌
❌
❌
❌
❌
❌
1603 - Design Parking System
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2348 - Number of Zero-Filled Subarrays
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2405 - Optimal Partition of String
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1396 - Design Underground System
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2306 - Naming a Company
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌

Two Pointers

Problem C C++ C# Dart GO Java JS Kotlin Python Ruby Rust Scala Swift TS
0125 - Valid Palindrome
0680 - Valid Palindrome II
❌
❌
❌
❌
1984 - Minimum Difference Between Highest And Lowest of K Scores
❌
❌
❌
❌
❌
❌
1768 - Merge Strings Alternately
❌
❌
❌
❌
❌
❌
❌
❌
0344 - Reverse String
❌
❌
❌
❌
0088 - Merge Sorted Array
❌
❌
❌
❌
❌
0283 - Move Zeroes
❌
❌
❌
0026 - Remove Duplicates From Sorted Array
❌
❌
❌
❌
❌
0080 - Remove Duplicates From Sorted Array II
❌
❌
❌
❌
❌
❌
❌
❌
❌
0167 - Two Sum II Input Array Is Sorted
❌
0015 - 3Sum
❌
0018 - 4Sum
❌
❌
❌
❌
❌
❌
❌
❌
0011 - Container With Most Water
1498 - Number of Subsequences That Satisfy The Given Sum Condition
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0189 - Rotate Array
❌
❌
❌
❌
❌
❌
❌
1968 - Array With Elements Not Equal to Average of Neighbors
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0881 - Boats to Save People
❌
❌
❌
❌
❌
❌
❌
0042 - Trapping Rain Water
❌
❌

Sliding Window

Problem C C++ C# Dart GO Java JS Kotlin Python Ruby Rust Scala Swift TS
0121 - Best Time to Buy And Sell Stock
❌
❌
0219 - Contains Duplicate II
❌
❌
❌
❌
❌
❌
❌
❌
❌
1343 - Number of Sub Arrays of Size K and Avg Greater than or Equal to Threshold
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0003 - Longest Substring Without Repeating Characters
❌
0424 - Longest Repeating Character Replacement
❌
❌
0567 - Permutation In String
❌
❌
❌
❌
1838 - Frequency of The Most Frequent Element
❌
❌
❌
❌
❌
0904 - Fruits into Basket
❌
❌
❌
❌
❌
❌
❌
❌
1456 - Maximum Number of Vowels in a Substring of Given Length
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1888 - Minimum Number of Flips to Make The Binary String Alternating
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0209 - Minimum Size Subarray Sum
❌
❌
❌
❌
❌
❌
❌
❌
0658 - Find K Closest Elements
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0076 - Minimum Window Substring
❌
❌
0239 - Sliding Window Maximum
❌
❌
❌

Stack

Problem C C++ C# Dart GO Java JS Kotlin Python Ruby Rust Scala Swift TS
0020 - Valid Parentheses
❌
0682 - Baseball Game
❌
❌
❌
0225 - Implement Stack Using Queues
❌
❌
❌
❌
❌
0155 - Min Stack
❌
❌
0150 - Evaluate Reverse Polish Notation
❌
❌
2390 - Removing Stars From a String
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0946 - Validate Stack Sequences
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0022 - Generate Parentheses
❌
❌
0735 - Asteroid Collision
❌
❌
❌
❌
❌
❌
❌
0739 - Daily Temperatures
❌
❌
0901 - Online Stock Span
❌
❌
❌
❌
❌
❌
❌
❌
0853 - Car Fleet
❌
❌
❌
0071 - Simplify Path
❌
❌
❌
❌
❌
❌
❌
❌
0394 - Decode String
❌
❌
❌
❌
❌
❌
❌
❌
❌
0402 - Remove K Digits
❌
❌
❌
❌
❌
❌
❌
1209 - Remove All Adjacent Duplicates In String II
❌
❌
❌
❌
❌
❌
❌
❌
❌
0132 - 132 Pattern
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0895 - Maximum Frequency Stack
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0084 - Largest Rectangle In Histogram
❌
❌
❌
❌

Binary Search

Problem DONE
0704 - Binary Search
βœ…
0035 - Search Insert Position
βœ…
0374 - Guess Number Higher Or Lower
βœ…
0441 - Arranging Coins
βœ…
0977 - Squares of a Sorted Array
βœ…
0367 - Valid Perfect Square
βœ…
0069 - Sqrt(x)
βœ…
0540 - Single Element in a Sorted Array
βœ…
1011 - Capacity to Ship Packages
βœ…
0162 - Find Peak Element
βœ…
2300 - Successful Pairs of Spells and Potions
βœ…
0074 - Search a 2D Matrix
βœ…
0875 - Koko Eating Bananas
βœ…
0153 - Find Minimum In Rotated Sorted Array
βœ…
0033 - Search In Rotated Sorted Array
βœ…
0981 - Time Based Key Value Store
βœ…
0034 - Find First And Last Position of Element In Sorted Array
βœ…
1898 - Maximum Number of Removable Characters
❌
0116 - Populating Next Right Pointers In Each Node
❌
1268 - Search Suggestions System
βœ…
0410 - Split Array Largest Sum
βœ…
0004 - Median of Two Sorted Arrays
❌

Linked List

Problem DONE
0206 - Reverse Linked List
βœ…
0021 - Merge Two Sorted Lists
βœ…
0234 - Palindrome Linked List
βœ…
0203 - Remove Linked List Elements
βœ…
0083 - Remove Duplicates From Sorted List
βœ…
0876 - Middle of the Linked List
βœ…
0160 - Intersection of Two Linked Lists
βœ…
0143 - Reorder List
βœ…
2130 - Maximum Twin Sum Of A Linked List
βœ…
0019 - Remove Nth Node From End of List
βœ…
1721 - Swapping Nodes in a Linked List
βœ…
0460 - LFU Cache
βœ…
0138 - Copy List With Random Pointer
βœ…
0707 - Design Linked List
βœ…
1472 - Design Browser History
βœ…
0002 - Add Two Numbers
βœ…
0141 - Linked List Cycle
βœ…
0287 - Find The Duplicate Number
βœ…
0142 - Linked List Cycle II
βœ…
0024 - Swap Nodes In Pairs
βœ…
0148 - Sort List
βœ…
0086 - Partition List
βœ…
0061 - Rotate List
βœ…
0092 - Reverse Linked List II
βœ…
0622 - Design Circular Queue
βœ…
0147 - Insertion Sort List
βœ…
0146 - LRU Cache
βœ…
0023 - Merge K Sorted Lists
βœ…
0025 - Reverse Nodes In K Group
βœ…

Trees

Problem DONE C++ C# Dart GO Java JS Kotlin Python Ruby Rust Scala Swift TS
0094 - Binary Tree Inorder Traversal
βœ…
0144 - Binary Tree Preorder Traversal
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0145 - Binary Tree Postorder Traversal
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0226 - Invert Binary Tree
βœ…
❌
❌
❌
0104 - Maximum Depth of Binary Tree
βœ…
❌
❌
0543 - Diameter of Binary Tree
βœ…
❌
❌
0110 - Balanced Binary Tree
βœ…
❌
❌
0100 - Same Tree
βœ…
❌
❌
0572 - Subtree of Another Tree
βœ…
❌
0108 - Convert Sorted Array to Binary Search Tree
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
0617 - Merge Two Binary Trees
βœ…
❌
❌
❌
❌
❌
❌
❌
0112 - Path Sum
βœ…
❌
❌
❌
❌
❌
❌
0235 - Lowest Common Ancestor of a Binary Search Tree
βœ…
❌
0701 - Insert into a Binary Search Tree
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
0450 - Delete Node in a BST
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
0102 - Binary Tree Level Order Traversal
βœ…
❌
❌
0199 - Binary Tree Right Side View
βœ…
❌
❌
❌
0783 - Minimum Distance between BST Nodes
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0101 - Symmetric Tree
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0103 - Binary Tree Zigzag Level Order Traversal
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0652 - Find Duplicate Subtrees
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0958 - Check Completeness of a Binary Tree
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0106 - Construct Binary Tree from Inorder and Postorder Traversal
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0662 - Maximum Width of Binary Tree
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1376 - Time Needed to Inform All Employees
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1448 - Count Good Nodes In Binary Tree
βœ…
❌
❌
❌
0098 - Validate Binary Search Tree
βœ…
❌
❌
❌
0230 - Kth Smallest Element In a Bst
βœ…
❌
❌
0105 - Construct Binary Tree From Preorder And Inorder Traversal
βœ…
❌
❌
❌
❌
❌
0096 - Unique Binary Search Trees
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0129 - Sum Root to Leaf Numbers
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0337 - House Robber III
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0951 - Flip Equivalent Binary Trees
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1993 - Operations On Tree
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0894 - All Possible Full Binary Trees
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0513 - Find Bottom Left Tree Value
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0669 - Trim a Binary Search Tree
βœ…
❌
❌
❌
❌
❌
❌
❌
0173 - Binary Search Tree Iterator
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0538 - Convert Bst to Greater Tree
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0124 - Binary Tree Maximum Path Sum
βœ…
❌
❌
❌
0297 - Serialize And Deserialize Binary Tree
βœ…
❌
❌
❌
❌
❌

Tries

Problem C C++ C# Dart GO Java JS Kotlin Python Ruby Rust Scala Swift TS
0208 - Implement Trie Prefix Tree
❌
0211 - Design Add And Search Words Data Structure
❌
❌
0212 - Word Search II
❌
❌
❌
❌
❌

Heap / Priority Queue

Problem DONE C++ C# Dart GO Java JS Kotlin Python Ruby Rust Scala Swift TS
0703 - Kth Largest Element In a Stream
βœ…
❌
❌
❌
1046 - Last Stone Weight
βœ…
❌
❌
❌
0973 - K Closest Points to Origin
βœ…
❌
❌
❌
❌
❌
0215 - Kth Largest Element In An Array
βœ…
❌
❌
❌
0621 - Task Scheduler
βœ…
❌
❌
❌
❌
❌
0355 - Design Twitter
βœ…
❌
❌
❌
❌
❌
❌
1675 - Minimize Deviation in Array
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2542 - Maximum Subsequence Score
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1834 - Single Threaded Cpu
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
1845 - Seat Reservation Manager
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1882 - Process Tasks Using Servers
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1985 - Find The Kth Largest Integer In The Array
βœ…
❌
❌
❌
❌
❌
❌
❌
0767 - Reorganize String
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1405 - Longest Happy String
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1094 - Car Pooling
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0295 - Find Median From Data Stream
βœ…
❌
❌
❌
❌
❌
1383 - Maximum Performance of a Team
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0502 - IPO
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌

Backtracking

Problem DONE C++ C# Dart GO Java JS Kotlin Python Ruby Rust Scala Swift TS
0078 - Subsets
βœ…
❌
❌
0039 - Combination Sum
βœ…
❌
❌
❌
0077 - Combinations
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
0046 - Permutations
βœ…
❌
❌
0090 - Subsets II
βœ…
❌
❌
❌
0040 - Combination Sum II
βœ…
❌
❌
❌
❌
0047 - Permutations II
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
0079 - Word Search
βœ…
❌
❌
❌
0131 - Palindrome Partitioning
βœ…
❌
❌
❌
❌
0093 - Restore IP Addresses
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
0017 - Letter Combinations of a Phone Number
βœ…
❌
❌
0473 - 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
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0698 - Partition to K Equal Sum Subsets
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0051 - N Queens
βœ…
❌
❌
❌
❌
0052 - N Queens II
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌

Graphs

Problem DONE C++ C# Dart GO Java JS Kotlin Python Ruby Rust Scala Swift TS
0463 - Island Perimeter
βœ…
❌
❌
❌
❌
❌
❌
0953 - Verifying An Alien Dictionary
βœ…
❌
❌
❌
❌
❌
❌
0200 - Number of Islands
βœ…
❌
❌
0133 - Clone Graph
βœ…
❌
❌
❌
0695 - Max Area of Island
βœ…
❌
❌
❌
❌
1905 - Count Sub Islands
βœ…
❌
❌
❌
❌
❌
❌
0417 - Pacific Atlantic Water Flow
βœ…
❌
❌
❌
❌
0130 - Surrounded Regions
βœ…
❌
❌
❌
❌
1466 - Reorder Routes to Make All Paths Lead to The City Zero
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
0994 - Rotting Oranges
βœ…
❌
❌
❌
❌
❌
0752 - Open The Lock
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
0802 - Find Eventual Safe States
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0207 - Course Schedule
βœ…
❌
❌
❌
❌
0210 - Course Schedule II
βœ…
❌
❌
❌
❌
❌
1462 - Course Schedule IV
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0934 - Shortest Bridge
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1091 - Shortest Path in Binary Matrix
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0684 - Redundant Connection
βœ…
❌
❌
❌
❌
0721 - Accounts Merge
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2359 - Find Closest Node to Given Two Nodes
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1091 - Shortest Path in a Binary Matrix
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1162 - As Far from Land as Possible
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1129 - Shortest Path with Alternating Colors
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2492 - Minimum Score of a Path Between Two Cities
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1254 - Number of Closed Islands
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1020 - Number of Enclaves
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1557 - Minimum Number of Vertices to Reach all Nodes
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0785 - Is Graph Bipartite?
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0399 - Evaluate Division
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2101 - Detonate the Maximum Bombs
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1857 - Largest Color Value in a Directed Graph
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1553 - Minimum Number of Days to Eat N Oranges
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0127 - Word Ladder
βœ…
❌
❌
❌
❌

Advanced Graphs

Problem DONE C++ C# Dart GO Java JS Kotlin Python Ruby Rust Scala Swift TS
0332 - Reconstruct Itinerary
βœ…
❌
❌
❌
❌
❌
❌
1584 - Min Cost to Connect All Points
βœ…
❌
❌
❌
❌
0743 - Network Delay Time
βœ…
❌
❌
❌
❌
❌
❌
1514 - Path with Maximum Probability
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
0778 - Swim In Rising Water
βœ…
❌
❌
❌
❌
❌
0269 - Alien Dictionary
❌
❌
❌
❌
❌
❌
❌
❌
❌
0787 - Cheapest Flights Within K Stops
βœ…
❌
❌
❌
❌
❌
2421 - Number of Good Paths
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
1579 - Remove Max Number of Edges to Keep Graph Fully Traversable
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌

1-D Dynamic Programming

Problem DONE C++ C# Dart GO Java JS Kotlin Python Ruby Rust Scala Swift TS
0070 - Climbing Stairs
βœ…
❌
❌
0746 - Min Cost Climbing Stairs
βœ…
❌
0198 - House Robber
βœ…
❌
0213 - House Robber II
βœ…
❌
0005 - Longest Palindromic Substring
βœ…
❌
❌
❌
❌
0647 - Palindromic Substrings
βœ…
❌
❌
❌
❌
0091 - Decode Ways
❌
❌
❌
❌
0322 - Coin Change
βœ…
❌
❌
❌
0152 - Maximum Product Subarray
βœ…
❌
❌
0139 - Word Break
βœ…
❌
❌
❌
❌
❌
0300 - Longest Increasing Subsequence
βœ…
❌
❌
❌
❌
❌
0416 - Partition Equal Subset Sum
βœ…
❌
❌
❌
❌
❌
❌
0120 - Triangle
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
0740 - Delete And Earn
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
0256 - Paint House
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0377 - Combination Sum IV
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0279 - Perfect Squares
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
1856 - Maximum Subarray Min Product
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0983 - Minimum Cost For Tickets
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0343 - Integer Break
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0673 - Number of Longest Increasing Subsequence
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0691 - Stickers to Spell Word
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1137 - N-th Tribonacci Number
βœ…
❌
❌
❌
❌
❌
❌
❌
1035 - Uncrossed Lines
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2140 - Solving Questions With Brainpower
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2466 - Count Ways to Build Good Strings
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1626 - Best Team with no Conflicts
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0837 - New 21 Game
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1406 - Stone Game III
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0472 - Concatenated Words
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1799 - Maximize Score after N Operations
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1964 - Find the Longest Valid Obstacle Course at Each Position
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌

2-D Dynamic Programming

Problem C C++ C# Dart GO Java JS Kotlin Python Ruby Rust Scala Swift TS
0062 - Unique Paths
βœ…
❌
❌
❌
❌
0063 - Unique Paths II
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
1143 - Longest Common Subsequence
βœ…
❌
❌
❌
0516 - Longest Palindromic Subsequence
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1049 - Last Stone Weight II
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0309 - Best Time to Buy And Sell Stock With Cooldown
βœ…
❌
❌
❌
0518 - Coin Change II
βœ…
❌
❌
❌
❌
0494 - Target Sum
βœ…
❌
❌
❌
❌
❌
0097 - Interleaving String
βœ…
❌
❌
❌
❌
0877 - Stone Game
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0064 - Minimum Path Sum
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
0329 - Longest Increasing Path In a Matrix
❌
❌
❌
❌
❌
❌
0221 - Maximal Square
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
0474 - Ones and Zeroes
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
5782 - Maximum Alternating Subsequence Sum
βœ…
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0115 - Distinct Subsequences
❌
❌
❌
❌
❌
❌
0072 - Edit Distance
❌
❌
❌
❌
❌
1220 - Count Vowels Permutation
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0312 - Burst Balloons
❌
❌
❌
❌
❌
❌
1866 - Number of Ways to Rearrange Sticks With K Sticks Visible
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0010 - Regular Expression Matching
❌
❌
❌
❌
❌
❌
1140 - Stone Game II
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0926 - Flip String to Monotone Increasing
❌
❌
❌
❌
❌
❌
❌
❌
❌
2218 - Maximum Value of K Coins from Piles
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1639 - Number of Ways to Form a Target String Given a Dictionary
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0879 - Profitable Schemes
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1547 - Minimum Cost to Cut a Stick
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌

Greedy

Problem C C++ C# Dart GO Java JS Kotlin Python Ruby Rust Scala Swift TS
0053 - Maximum Subarray
❌
❌
0918 - Maximum Sum Circular Subarray
❌
❌
❌
❌
❌
❌
❌
❌
0978 - Longest Turbulent Array
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0055 - Jump Game
❌
❌
❌
0045 - Jump Game II
❌
❌
❌
1871 - Jump Game VII
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0134 - Gas Station
❌
❌
❌
0846 - Hand of Straights
❌
❌
❌
❌
2439 - Minimize Maximum of Array
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0649 - Dota2 Senate
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1423 - Maximum Points You Can Obtain From Cards
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1899 - Merge Triplets to Form Target Triplet
❌
❌
❌
❌
0763 - Partition Labels
❌
❌
❌
❌
❌
0678 - Valid Parenthesis String
❌
❌
❌
❌
❌
❌
1921 - Eliminate Maximum Number of Monsters
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1029 - Two City Scheduling
❌
❌
❌
❌
❌
❌
❌
❌

Intervals

Problem C C++ C# Dart GO Java JS Kotlin Python Ruby Rust Scala Swift TS
0057 - Insert Interval
❌
❌
❌
0056 - Merge Intervals
❌
❌
❌
❌
0435 - Non Overlapping Intervals
❌
❌
❌
❌
0252 - Meeting Rooms
❌
❌
❌
❌
❌
❌
❌
❌
0253 - Meeting Rooms II
❌
❌
❌
❌
❌
❌
❌
1288 - Remove Covered Intervals
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1851 - Minimum Interval to Include Each Query
❌
❌
❌
❌
❌
❌
❌
❌
❌
0352 - Data Stream as Disjoint Intervals
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌

Math & Geometry

Problem C C++ C# Dart GO Java JS Kotlin Python Ruby Rust Scala Swift TS
1071 - Greatest Common Divisor of Strings
❌
❌
❌
❌
❌
❌
❌
❌
❌
1523 - Count Odd Numbers in an Interval Range
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
1572 - Matrix Diagonal Sum
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0149 - Maximum Points on a Line
❌
❌
❌
❌
❌
❌
❌
❌
❌
0048 - Rotate Image
❌
❌
0054 - Spiral Matrix
❌
❌
❌
❌
0059 - Spiral Matrix II
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0073 - Set Matrix Zeroes
❌
❌
❌
❌
0202 - Happy Number
❌
❌
0066 - Plus One
❌
❌
0009 - Palindrome Number
❌
❌
❌
❌
0263 - Ugly Number
❌
❌
❌
❌
❌
1260 - Shift 2D Grid
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0013 - Roman to Integer
❌
❌
❌
❌
❌
❌
❌
❌
0012 - Integer to Roman
❌
❌
❌
❌
❌
❌
❌
❌
❌
0050 - Pow(x, n)
❌
❌
❌
❌
0043 - Multiply Strings
❌
❌
❌
❌
2013 - Detect Squares
❌
❌
❌
❌
❌
❌
1041 - Robot Bounded In Circle
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
0006 - Zigzag Conversion
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2028 - Find Missing Observations
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌

Bit Manipulation

Problem C C++ C# Dart GO Java JS Kotlin Python Ruby Rust Scala Swift TS
0136 - Single Number
❌
❌
0191 - Number of 1 Bits
❌
❌
0338 - Counting Bits
❌
❌
0190 - Reverse Bits
❌
❌
0268 - Missing Number
❌
❌
1470 - Shuffle the Array
❌
❌
❌
❌
❌
❌
❌
❌
❌
0989 - Add to Array-Form of Integer
❌
❌
❌
❌
❌
❌
❌
❌
❌
0371 - Sum of Two Integers
❌
❌
0007 - Reverse Integer
❌
0067 - Add Binary
❌
❌
❌
❌
❌
❌
❌
❌

JavaScript

Problem C C++ C# Dart GO Java JS Kotlin Python Ruby Rust Scala Swift TS
2667 - Create Hello World Function (Closure - Day1)
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2620 - Counter (Closure - Day2)
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2665 - Counter (Closure - Day3)
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2635 - Apply Transform over each Element in Array (Transform)
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2634 - Filter Elements from Array (Transforms)
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2626 - Array Reduce Transformation (Transforms)
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2629 - Function Composition
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2666 - Allow One Function Call
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2623 - Memoize
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2632 - Curry
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2621 - Sleep
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2637 - Promise Time Limit
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2636 - Promise Pool
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2622 - Cache With Time Limit
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2627 - Debounce
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2676 - Throttle
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2628 - JSON Deep Equal
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2633 - Convert Object to JSON String
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2675 - Array of Objects to Matrix
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2700 - Difference Between Two Objects
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2677 - Chunk Array
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2625 - Flatten Deeply Nested Array
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2619 - Array Prototype Last
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2631 - Group By
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2618 - Check if Object Instance of Class
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2693 - Call Function with Custom Context
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2694 - Event Emitter
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2695 - Array Wrapper
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2648 - Generate Fibonacci Sequence
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
2649 - Nested Array Generator
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌

Need to update the README? Update the template instead.

About

Leetcode solutions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 17.5%
  • C++ 12.6%
  • Java 11.7%
  • Kotlin 11.6%
  • C 8.8%
  • Python 7.6%
  • Other 30.2%