Need help with LeetCode?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

450 Stars 106 Forks Other 138 Commits 0 Opened issues


Solutions of LeetCode Online Judge

Services available


Need anything else?

Contributors list

# 15,954
134 commits
# 597,264
1 commit
# 556,987
1 commit


LeetCode solutions gives some thoughts on selected problems.

Solved 783/1883 problems.




| # | Title | Solution | |---| ----- | -------- | |2081|Sum of k-Mirror Numbers|| |2078|Two Furthest Houses With Different Colors|| |2065|Maximum Path Quality of a Graph|| |2064|Minimized Maximum of Products Distributed to Any Store|| |2063|Vowels of All Substrings|| |2062|Count Vowel Substrings of a String|| |2060|Check if an Original String Exists Given Two Encoded Strings|| |2059|Minimum Operations to Convert Number|| |2057|Smallest Index With Equal Value|smallest-index-with-equal-value.nim| |2050|Parallel Courses III|parallel-courses-iii.nim| |2049|Count Nodes With the Highest Score|count-nodes-with-the-highest-score.nim| |2048|Next Greater Numerically Balanced Number|| |2047|Number of Valid Words in a Sentence|| |2045|Second Minimum Time to Reach Destination|second-minimum-time-to-reach-destination.nim| |2044|Count Number of Maximum Bitwise-OR Subsets|count-number-of-maximum-bitwise-or-subsets.nim| |2043|Simple Bank System|| |2042|Check if Numbers Are Ascending in a Sentence|| |2055|Plates Between Candles|plates-between-candles.nim| |2054|Two Best Non-Overlapping Events|two-best-non-overlapping-events.nim| |2035|Partition Array Into Two Arrays to Minimize Sum Difference|partition-array-into-two-arrays-to-minimize-sum-difference.nim| |2033|Minimum Operations to Make a Uni-Value Grid|minimum-operations-to-make-a-uni-value-grid.nim| |2032|Two Out of Three|| |2030|Smallest K-Length Subsequence With Occurrences of a Letter|smallest-k-length-subsequence-with-occurrences-of-a-letter.nim| |2029|Stone Game IX|stone-game-ix.nim| |2028|Find Missing Observations|| |2027|Minimum Moves to Convert String|| |2040|Kth Smallest Product of Two Sorted Arrays|kth-smallest-product-of-two-sorted-arrays.nim| |2019|The Score of Students Solving Math Expression|the-score-of-students-solving-math-expression.nim| |2018|Check if Word Can Be Placed In Crossword|| |2017|Grid Game|| |2016|Maximum Difference Between Increasing Elements|| |2014|Longest Subsequence Repeated k Times|| |2013|Detect Squares|detect-squares.nim| |2012|Sum of Beauty in the Array|| |2011|Final Value of Variable After Performing Operations|| |2025|Maximum Number of Ways to Partition an Array|maximum-number-of-ways-to-partition-an-array.nim| |2024|Maximize the Confusion of an Exam|maximize-the-confusion-of-an-exam.nim| |2003|Smallest Missing Genetic Value in Each Subtree|| |2002|Maximum Product of the Length of Two Palindromic Subsequences|| |2001|Number of Pairs of Interchangeable Rectangles|| |1998|GCD Sort of an Array|| |1997|First Day Where You Have Been in All the Rooms|| |1996|The Number of Weak Characters in the Game|| |1995|Count Special Quadruplets|| |2009|Minimum Number of Operations to Make Array Continuous|| |2008|Maximum Earnings From Taxi|maximum-earnings-from-taxi.nim| |1986|Minimum Number of Work Sessions to Finish the Tasks|| |1982|Find Array Given Subset Sums|| |1994|The Number of Good Subsets|| |1970|Last Day Where You Can Still Cross|| |1969|Minimum Non-Zero Product of the Array Elements|| |1963|Minimum Number of Swaps to Make the String Balanced|| |1977|Number of Ways to Separate Numbers|| |1976|Number of Ways to Arrive at Destination|| |1975|Maximum Matrix Sum|| |1955|Count Number of Special Subsequences|| |1953|Maximum Number of Weeks for Which You Can Work|| |1959|Minimum Total Space Wasted With K Resizing Operations|| |1948|Delete Duplicate Folders in System|| |1947|Maximum Compatibility Score Sum|| |1938|Maximum Genetic Difference Query|| |1937|Maximum Number of Points with Cost|| |1931|Painting a Grid With Three Different Colors|| |1932|Merge BSTs to Create Single BST|| |1943|Describe the Painting|| |1942|The Number of the Smallest Unoccupied Chair|| |1923|Longest Common Subpath|| |1915|Number of Wonderful Substrings|| |1914|Cyclically Rotating a Grid|| |1928|Minimum Cost to Reach Destination in Time|| |1906|Minimum Absolute Difference Queries|| |1900|The Earliest and Latest Rounds Where Players Compete|| |1898|Maximum Number of Removable Characters|| |1911|Maximum Alternating Subsequence Sum|| |1909|Remove One Element to Make the Array Strictly Increasing|| |1889|Minimum Space Wasted From Packaging|| |1888|Minimum Number of Flips to Make the Binary String Alternating|| |1883|Minimum Skips to Arrive at Meeting On Time|| |1882|Process Tasks Using Servers|| |1896|Minimum Cost to Change the Final Value of Expression|| |1872|Stone Game VIII|| |1871|Jump Game VII|| |1870|Minimum Speed to Arrive on Time|| |1866|Number of Ways to Rearrange Sticks With K Sticks Visible|| |1878|Get Biggest Three Rhombus Sums in a Grid|| |1857|Largest Color Value in a Directed Graph|| |1856|Maximum Subarray Min-Product|| |1850|Minimum Adjacent Swaps to Reach the Kth Smallest Number|| |1851|Minimum Interval to Include Each Query|| |1849|Splitting a String Into Descending Consecutive Values|| |1848|Minimum Distance to the Target Element|| |1861|Rotating the Box|| |1840|Maximum Building Height|| |1839|Longest Substring Of All Vowels in Order|| |1838|Frequency of the Most Frequent Element|| |1837|Sum of Digits in Base K|| |1835|Find XOR Sum of All Pairs Bitwise AND|| |1834|Single-Threaded CPU|| |1833|Maximum Ice Cream Bars|| |1832|Check if the Sentence Is Pangram|| |1847|Closest Room|| |1846|Maximum Element After Decreasing and Rearranging|| |1825|Finding MK Average|| |1824|Minimum Sideway Jumps|| |1819|Number of Different Subsequences GCDs|| |1818|Minimum Absolute Sum Difference|| |1817|Finding the Users Active Minutes|| |1816|Truncate Sentence|| |1830|Minimum Number of Operations to Make String Sorted|| |1802|Maximum Value at a Given Index in a Bounded Array|maximum-value-at-a-given-index-in-a-bounded-array.nim| |1801|Number of Orders in the Backlog|| |1771|Maximize Palindrome Length From Subsequences|| |1770|Maximum Score from Performing Multiplication Operations|| |1769|Minimum Number of Operations to Move All Balls to Each Box|| |1768|Merge Strings Alternately|| |1755|Closest Subsequence Sum|closest-subsequence-sum.nim| |1765|Map of Highest Peak|| |1766|Tree of Coprimes|| |1764|Form Array by Concatenating Subarrays of Another Array|| |1737|Change Minimum Characters to Satisfy One of Three Conditions|| |1751|Maximum Number of Events That Can Be Attended II|maximum-number-of-events-that-can-be-attended-ii.nim| |1698|Number of Distinct Substrings in a String|| |1713|Minimum Operations to Make a Subsequence|| |1707|Maximum XOR With an Element From Array|| |1697|Checking Existence of Edge Length Limited Paths|| |1694|Reformat Phone Number|| |1703|Minimum Adjacent Swaps for K Consecutive Ones|minimum-adjacent-swaps-for-k-consecutive-ones.nim| |1674|Minimum Moves to Make Array Complementary|| |1673|Find the Most Competitive Subsequence|find-the-most-competitive-subsequence.nim| |1655|Distribute Repeating Integers|| |1601|Maximum Number of Achievable Transfer Requests|| |1591|Strange Printer II|| |1589|Maximum Sum Obtained of Any Permutation|| |1542|Find Longest Awesome Substring|| |1541|Minimum Insertions to Balance a Parentheses String|| |1499|Max Value of Equation|| |1494|Parallel Courses II|| |1452|People Whose List of Favorite Companies Is Not a Subset of Another List|| |1462|Course Schedule IV|| |1439|Find the Kth Smallest Sum of a Matrix With Sorted Rows|| |1383|Maximum Performance of a Team|| |1353|Maximum Number of Events That Can Be Attended|| |1371|Find the Longest Substring Containing Vowels in Even Counts|| |1284|Minimum Number of Flips to Convert Binary Matrix to Zero Matrix|| |1263|Minimum Moves to Move a Box to Their Target Location|| |1262|Greatest Sum Divisible by Three|| |1261|Find Elements in a Contaminated Binary Tree|| |1260|Shift 2D Grid|| |1255|Maximum Score Words Formed by Letters|| |1254|Number of Closed Islands|| |1253|Reconstruct a 2-Row Binary Matrix|| |1252|Cells with Odd Values in a Matrix|| |1235|Maximum Profit in Job Scheduling|| |1960|Maximum Product of the Length of Two Palindromic Substrings|| |1862|Sum of Floored Pairs|| |1916|Count Ways to Build Rooms in an Ant Colony|| |2079|Watering Plants|| |1944|Number of Visible People in a Queue|| |1405|Longest Happy String|| |2080|Range Frequency Queries|| |1627|Graph Connectivity With Threshold|| |1109|Corporate Flight Bookings|| |1105|Filling Bookcase Shelves|| |1094|Car Pooling|| |1081|Smallest Subsequence of Distinct Characters|smallest-subsequence-of-distinct-characters.nim| |1054|Distant Barcodes|| |1044|Longest Duplicate Substring|| |1043|Partition Array for Maximum Sum|| |1042|Flower Planting With No Adjacent|| |1041|Robot Bounded In Circle|| |1036|Escape a Large Maze|| |1035|Uncrossed Lines|| |1034|Coloring A Border|| |1033|Moving Stones Until Consecutive|| |1032|Stream of Characters|| |1031|Maximum Sum of Two Non-Overlapping Subarrays|| |1029|Two City Scheduling|| |1030|Matrix Cells in Distance Order|| |1028|Recover a Tree From Preorder Traversal|| |1026|Maximum Difference Between Node and Ancestor|| |1025|Divisor Game|| |1020|Number of Enclaves|| |1019|Next Greater Node In Linked List|| |1018|Binary Prefix Divisible By 5|| |1017|Convert to Base -2|| |1016|Binary String With Substrings Representing 1 To N|| |1015|Smallest Integer Divisible by K|| |1014|Best Sightseeing Pair|| |1013|Partition Array Into Three Parts With Equal Sum|| |1011|Capacity To Ship Packages Within D Days|| |1010|Pairs of Songs With Total Durations Divisible by 60|| |1009|Complement of Base 10 Integer|| |1008|Construct Binary Search Tree from Preorder Traversal|| |1007|Minimum Domino Rotations For Equal Row|| |1006|Clumsy Factorial|| |1005|Maximize Sum Of Array After K Negations|| |1004|Max Consecutive Ones III|max-consecutive-ones-iii.nim| |1003|Check If Word Is Valid After Substitutions|| |1002|Find Common Characters|| |1000|Minimum Cost to Merge Stones|| |996|Number of Squareful Arrays|| |995|Minimum Number of K Consecutive Bit Flips|| |994|Rotting Oranges|| |993|Cousins in Binary Tree|| |992|Subarrays with K Different Integers|| |991|Broken Calculator|| |990|Satisfiability of Equality Equations|| |989|Add to Array-Form of Integer|| |984|String Without AAA or BBB|| |980|Unique Paths III|| |979|Distribute Coins in Binary Tree|| |978|Longest Turbulent Subarray|| |977|Squares of a Sorted Array|| |973|K Closest Points to Origin|| |960|Delete Columns to Make Sorted III|| |959|Regions Cut By Slashes|| |958|Check Completeness of a Binary Tree|| |957|Prison Cells After N Days|| |956|Tallest Billboard|| |955|Delete Columns to Make Sorted II|| |954|Array of Doubled Pairs|| |953|Verifying an Alien Dictionary|| |952|Largest Component Size by Common Factor|| |940|Distinct Subsequences II|| |939|Minimum Area Rectangle|| |938|Range Sum of BST|| |932|Beautiful Array|| |931|Minimum Falling Path Sum|| |930|Binary Subarrays With Sum|binary-subarrays-with-sum.nim| |929|Unique Email Addresses|| |921|Minimum Add to Make Parentheses Valid|| |911|Online Election|| |910|Smallest Range II|| |909|Snakes and Ladders|| |908|Smallest Range I|| |907|Sum of Subarray Minimums|| |906|Super Palindromes|| |903|Valid Permutations for DI Sequence|| |902|Numbers At Most N Given Digit Set|| |901|Online Stock Span|| |900|RLE Iterator|| |899|Orderly Queue|| |898|Bitwise ORs of Subarrays|| |897|Increasing Order Search Tree|| |896|Monotonic Array|| |891|Sum of Subsequence Widths|| |890|Find and Replace Pattern|| |889|Construct Binary Tree from Preorder and Postorder Traversal|| |888|Fair Candy Swap|| |883|Projection Area of 3D Shapes|| |882|Reachable Nodes In Subdivided Graph|| |881|Boats to Save People|| |880|Decoded String at Index|| |875|Koko Eating Bananas|| |874|Walking Robot Simulation|| |873|Length of Longest Fibonacci Subsequence|| |872|Leaf-Similar Trees|| |871|Minimum Number of Refueling Stops|| |870|Advantage Shuffle|| |869|Reordered Power of 2|| |868|Binary Gap|| |866|Prime Palindrome|| |859|Buddy Strings|| |858|Mirror Reflection|| |857|Minimum Cost to Hire K Workers|| |856|Score of Parentheses|| |855|Exam Room|| |854|K-Similar Strings|| |853|Car Fleet|| |852|Peak Index in a Mountain Array|| |843|Guess the Word|| |842|Split Array into Fibonacci Sequence|| |841|Keys and Rooms|| |840|Magic Squares In Grid|| |835|Image Overlap|| |834|Sum of Distances in Tree|| |833|Find And Replace in String|| |832|Flipping an Image|| |827|Making A Large Island|| |826|Most Profit Assigning Work|| |825|Friends Of Appropriate Ages|| |824|Goat Latin|| |815|Bus Routes|| |814|Binary Tree Pruning|| |813|Largest Sum of Averages|| |812|Largest Triangle Area|| |803|Bricks Falling When Hit|| |802|Find Eventual Safe States|| |798|Smallest Rotation with Highest Score|| |795|Number of Subarrays with Bounded Maximum|| |792|Number of Matching Subsequences|| |767|Reorganize String|| |719|Find K-th Smallest Pair Distance|find-k-th-smallest-pair-distance.nim| |679|24 Game|24-game.nim| |678|Valid Parenthesis String|| |673|Number of Longest Increasing Subsequence|| |668|Kth Smallest Number in Multiplication Table|kth-smallest-number-in-multiplication-table.nim| |664|Strange Printer|| |652|Find Duplicate Subtrees|| |643|Maximum Average Subarray I|| |636|Exclusive Time of Functions|| |635|Design Log Storage System|| |634|Find the Derangement of An Array|| |633|Sum of Square Numbers|| |631|Design Excel Sum Formula|| |630|Course Schedule III|| |629|K Inverse Pairs Array|| |628|Maximum Product of Three Numbers|| |617|Merge Two Binary Trees|| |616|Add Bold Tag in String|| |611|Valid Triangle Number|| |604|Design Compressed String Iterator|| |600|Non-negative Integers without Consecutive Ones|| |599|Minimum Index Sum of Two Lists|| |598|Range Addition II|| |594|Longest Harmonious Subsequence|| |593|Valid Square|| |592|Fraction Addition and Subtraction|| |588|Design In-Memory File System|| |587|Erect the Fence|| |583|Delete Operation for Two Strings|| |582|Kill Process|| |581|Shortest Unsorted Continuous Subarray|| |575|Distribute Candies|| |565|Array Nesting|| |556|Next Greater Element III|| |553|Optimal Division|| |552|Student Attendance Record II|| |543|Diameter of Binary Tree|diameter-of-binary-tree.nim| |533|Lonely Pixel II|| |531|Lonely Pixel I|| |524|Longest Word in Dictionary through Deleting|| |514|Freedom Trail|| |508|Most Frequent Subtree Sum|| |507|Perfect Number|| |504|Base 7|| |502|IPO|| |501|Find Mode in Binary Search Tree|| |500|Keyboard Row|| |495|Teemo Attacking|| |494|Target Sum|| |491|Increasing Subsequences|| |490|The Maze|| |485|Max Consecutive Ones|| |483|Smallest Good Base|| |482|License Key Formatting|| |481|Magical String|| |480|Sliding Window Median|| |479|Largest Palindrome Product|| |477|Total Hamming Distance|| |476|Number Complement|| |475|Heaters|| |474|Ones and Zeroes|| |473|Matchsticks to Square|| |472|Concatenated Words|| |469|Convex Polygon|| |468|Validate IP Address|| |467|Unique Substrings in Wraparound String|| |466|Count The Repetitions|| |465|Optimal Account Balancing|| |464|Can I Win|| |463|Island Perimeter|| |462|Minimum Moves to Equal Array Elements II|| |461|Hamming Distance|| |459|Repeated Substring Pattern|| |456|132 Pattern|| |455|Assign Cookies|| |454|4Sum II|| |453|Minimum Moves to Equal Array Elements|| |452|Minimum Number of Arrows to Burst Balloons|| |447|Number of Boomerangs|| |446|Arithmetic Slices II - Subsequence|| |444|Sequence Reconstruction|| |441|Arranging Coins|| |440|K-th Smallest in Lexicographical Order|| |439|Ternary Expression Parser|| |438|Find All Anagrams in a String|| |437|Path Sum III|| |436|Find Right Interval|| |435|Non-overlapping Intervals|| |434|Number of Segments in a String|| |432|All O`one Data Structure|| |424|Longest Repeating Character Replacement|longest-repeating-character-replacement.nim| |423|Reconstruct Original Digits from English|| |422|Valid Word Square|| |421|Maximum XOR of Two Numbers in an Array|| |420|Strong Password Checker|| |419|Battleships in a Board|| |417|Pacific Atlantic Water Flow|| |416|Partition Equal Subset Sum|| |415|Add Strings|| |414|Third Maximum Number|| |413|Arithmetic Slices|| |412|Fizz Buzz|| |410|Split Array Largest Sum|| |409|Longest Palindrome|| |408|Valid Word Abbreviation|| |407|Trapping Rain Water II|| |406|Queue Reconstruction by Height|| |405|Convert a Number to Hexadecimal|| |404|Sum of Left Leaves|| |403|Frog Jump|| |402|Remove K Digits|remove-k-digits.nim| |401|Binary Watch|| |400|Nth Digit|| |399|Evaluate Division|| |398|Random Pick Index|| |397|Integer Replacement|| |396|Rotate Function|| |395|Longest Substring with At Least K Repeating Characters|| |394|Decode String|| |393|UTF-8 Validation|| |392|Is Subsequence|| |391|Perfect Rectangle|| |390|Elimination Game|| |389|Find the Difference|| |388|Longest Absolute File Path|| |387|First Unique Character in a String|| |386|Lexicographical Numbers|| |385|Mini Parser|| |384|Shuffle an Array|| |383|Ransom Note|| |382|Linked List Random Node|| |381|Insert Delete GetRandom O(1) - Duplicates allowed|| |380|Insert Delete GetRandom O(1)|| |379|Design Phone Directory|| |378|Kth Smallest Element in a Sorted Matrix|kth-smallest-element-in-a-sorted-matrix.nim| |377|Combination Sum IV|| |376|Wiggle Subsequence|| |375|Guess Number Higher or Lower II|| |374|Guess Number Higher or Lower|| |373|Find K Pairs with Smallest Sums|find-k-pairs-with-smallest-sums.nim| |372|Super Pow|| |371|Sum of Two Integers|| |370|Range Addition|| |369|Plus One Linked List|| |368|Largest Divisible Subset|| |367|Valid Perfect Square|| |366|Find Leaves of Binary Tree|| |365|Water and Jug Problem|| |364|Nested List Weight Sum II|| |362|Design Hit Counter|| |361|Bomb Enemy|| |360|Sort Transformed Array|| |359|Logger Rate Limiter|| |358|Rearrange String k Distance Apart|| |357|Count Numbers with Unique Digits|| |356|Line Reflection|| |355|Design Twitter|| |354|Russian Doll Envelopes|| |353|Design Snake Game|| |352|Data Stream as Disjoint Intervals|| |351|Android Unlock Patterns|| |350|Intersection of Two Arrays II|| |349|Intersection of Two Arrays|| |348|Design Tic-Tac-Toe|| |347|Top K Frequent Elements|| |346|Moving Average from Data Stream|| |345|Reverse Vowels of a String|| |344|Reverse String|| |343|Integer Break|| |342|Power of Four|| |341|Flatten Nested List Iterator|| |340|Longest Substring with At Most K Distinct Characters|| |339|Nested List Weight Sum|| |338|Counting Bits|| |337|House Robber III|| |336|Palindrome Pairs|| |335|Self Crossing|| |334|Increasing Triplet Subsequence|| |333|Largest BST Subtree|| |332|Reconstruct Itinerary|| |331|Verify Preorder Serialization of a Binary Tree|| |330|Patching Array|| |329|Longest Increasing Path in a Matrix|| |328|Odd Even Linked List|| |327|Count of Range Sum|| |326|Power of Three|| |325|Maximum Size Subarray Sum Equals k|| |324|Wiggle Sort II|| |323|Number of Connected Components in an Undirected Graph|| |322|Coin Change|| |321|Create Maximum Number|| |320|Generalized Abbreviation|| |319|Bulb Switcher|| |318|Maximum Product of Word Lengths|| |317|Shortest Distance from All Buildings|| |316|Remove Duplicate Letters|remove-duplicate-letters.nim| |315|Count of Smaller Numbers After Self|| |314|Binary Tree Vertical Order Traversal|| |313|Super Ugly Number|| |312|Burst Balloons|| |311|Sparse Matrix Multiplication|| |310|Minimum Height Trees|| |309|Best Time to Buy and Sell Stock with Cooldown|| |308|Range Sum Query 2D - Mutable|| |307|Range Sum Query - Mutable|| |306|Additive Number|| |305|Number of Islands II|| |304|Range Sum Query 2D - Immutable|| |303|Range Sum Query - Immutable|| |302|Smallest Rectangle Enclosing Black Pixels|| |301|Remove Invalid Parentheses|| |300|Longest Increasing Subsequence|| |299|Bulls and Cows|| |298|Binary Tree Longest Consecutive Sequence|| |297|Serialize and Deserialize Binary Tree|| |296|Best Meeting Point|| |295|Find Median from Data Stream|| |294|Flip Game II|| |293|Flip Game|| |292|Nim Game|| |291|Word Pattern II|| |290|Word Pattern|| |289|Game of Life|| |288|Unique Word Abbreviation|| |287|Find the Duplicate Number|| |286|Walls and Gates|| |285|Inorder Successor in BST|| |284|Peeking Iterator|| |283|Move Zeroes|| |282|Expression Add Operators|| |281|Zigzag Iterator|| |280|Wiggle Sort|| |279|Perfect Squares|| |278|First Bad Version|| |277|Find the Celebrity|| |276|Paint Fence|| |275|H-Index II|| |274|H-Index|| |273|Integer to English Words|| |272|Closest Binary Search Tree Value II|| |271|Encode and Decode Strings|| |270|Closest Binary Search Tree Value|| |269|Alien Dictionary|| |268|Missing Number|| |267|Palindrome Permutation II|| |266|Palindrome Permutation|| |265|Paint House II|| |264|Ugly Number II|| |263|Ugly Number|| |261|Graph Valid Tree|| |260|Single Number III|| |259|3Sum Smaller|| |258|Add Digits|| |257|Binary Tree Paths|| |256|Paint House|| |255|Verify Preorder Sequence in Binary Search Tree|| |254|Factor Combinations|| |253|Meeting Rooms II|| |252|Meeting Rooms|| |251|Flatten 2D Vector|| |250|Count Univalue Subtrees|| |249|Group Shifted Strings|| |248|Strobogrammatic Number III|| |247|Strobogrammatic Number II|| |246|Strobogrammatic Number|| |245|Shortest Word Distance III|| |244|Shortest Word Distance II|| |243|Shortest Word Distance|| |242|Valid Anagram|| |241|Different Ways to Add Parentheses|different-ways-to-add-parentheses.nim| |240|Search a 2D Matrix II|| |239|Sliding Window Maximum|| |238|Product of Array Except Self|| |237|Delete Node in a Linked List|| |236|Lowest Common Ancestor of a Binary Tree|| |235|Lowest Common Ancestor of a Binary Search Tree|| |234|Palindrome Linked List|| |233|Number of Digit One|| |232|Implement Queue using Stacks|| |231|Power of Two|| |230|Kth Smallest Element in a BST|| |229|Majority Element II|| |228|Summary Ranges|| |227|Basic Calculator II|basic-calculator-ii.nim| |226|Invert Binary Tree|| |225|Implement Stack using Queues|| |224|Basic Calculator|| |223|Rectangle Area|| |222|Count Complete Tree Nodes|| |221|Maximal Square|| |220|Contains Duplicate III|| |219|Contains Duplicate II|| |218|The Skyline Problem|| |217|Contains Duplicate|| |216|Combination Sum III|| |215|Kth Largest Element in an Array|| |214|Shortest Palindrome|| |213|House Robber II|| |212|Word Search II|| |210|Course Schedule II|course-schedule-ii.nim| |209|Minimum Size Subarray Sum|| |208|Implement Trie (Prefix Tree)|| |207|Course Schedule|course-schedule.nim| |206|Reverse Linked List|| |205|Isomorphic Strings|| |204|Count Primes|| |203|Remove Linked List Elements|| |202|Happy Number|| |201|Bitwise AND of Numbers Range|| |200|Number of Islands|| |199|Binary Tree Right Side View|| |198|House Robber|| |191|Number of 1 Bits|| |190|Reverse Bits|| |189|Rotate Array|| |188|Best Time to Buy and Sell Stock IV|| |187|Repeated DNA Sequences|| |186|Reverse Words in a String II|| |179|Largest Number|| |174|Dungeon Game|| |173|Binary Search Tree Iterator|| |172|Factorial Trailing Zeroes|| |171|Excel Sheet Column Number|| |170|Two Sum III - Data structure design|| |169|Majority Element|| |168|Excel Sheet Column Title|| |167|Two Sum II - Input Array Is Sorted|| |166|Fraction to Recurring Decimal|| |165|Compare Version Numbers|| |164|Maximum Gap|| |163|Missing Ranges|| |162|Find Peak Element|| |161|One Edit Distance|| |160|Intersection of Two Linked Lists|| |159|Longest Substring with At Most Two Distinct Characters|| |158|Read N Characters Given read4 II - Call Multiple Times|| |157|Read N Characters Given Read4|| |156|Binary Tree Upside Down|| |155|Min Stack|| |154|Find Minimum in Rotated Sorted Array II|| |153|Find Minimum in Rotated Sorted Array|| |152|Maximum Product Subarray|| |151|Reverse Words in a String|| |150|Evaluate Reverse Polish Notation|| |149|Max Points on a Line|| |148|Sort List|| |147|Insertion Sort List|| |146|LRU Cache|| |145|Binary Tree Postorder Traversal|| |144|Binary Tree Preorder Traversal|| |143|Reorder List|| |142|Linked List Cycle II|| |141|Linked List Cycle|| |140|Word Break II|| |139|Word Break|| |138|Copy List with Random Pointer|| |137|Single Number II|| |136|Single Number|| |135|Candy|| |134|Gas Station|| |133|Clone Graph|| |132|Palindrome Partitioning II|| |131|Palindrome Partitioning|| |130|Surrounded Regions|| |129|Sum Root to Leaf Numbers|| |128|Longest Consecutive Sequence|| |127|Word Ladder|| |126|Word Ladder II|| |125|Valid Palindrome|| |124|Binary Tree Maximum Path Sum|binary-tree-maximum-path-sum.nim| |123|Best Time to Buy and Sell Stock III|| |122|Best Time to Buy and Sell Stock II|| |121|Best Time to Buy and Sell Stock|| |120|Triangle|| |119|Pascal's Triangle II|| |118|Pascal's Triangle|| |117|Populating Next Right Pointers in Each Node II|| |116|Populating Next Right Pointers in Each Node|| |115|Distinct Subsequences|| |114|Flatten Binary Tree to Linked List|| |113|Path Sum II|| |112|Path Sum|| |111|Minimum Depth of Binary Tree|| |110|Balanced Binary Tree|| |109|Convert Sorted List to Binary Search Tree|| |108|Convert Sorted Array to Binary Search Tree|| |107|Binary Tree Level Order Traversal II|| |106|Construct Binary Tree from Inorder and Postorder Traversal|| |105|Construct Binary Tree from Preorder and Inorder Traversal|| |104|Maximum Depth of Binary Tree|| |103|Binary Tree Zigzag Level Order Traversal|| |102|Binary Tree Level Order Traversal|| |101|Symmetric Tree|| |100|Same Tree|| |99|Recover Binary Search Tree|| |98|Validate Binary Search Tree|| |97|Interleaving String|| |96|Unique Binary Search Trees|| |95|Unique Binary Search Trees II|| |94|Binary Tree Inorder Traversal|| |93|Restore IP Addresses|| |92|Reverse Linked List II|| |91|Decode Ways|| |90|Subsets II|| |89|Gray Code|| |88|Merge Sorted Array|| |87|Scramble String|| |86|Partition List|| |85|Maximal Rectangle|| |84|Largest Rectangle in Histogram|| |83|Remove Duplicates from Sorted List|| |82|Remove Duplicates from Sorted List II|| |81|Search in Rotated Sorted Array II|| |80|Remove Duplicates from Sorted Array II|| |79|Word Search|| |78|Subsets|| |77|Combinations|| |76|Minimum Window Substring|| |75|Sort Colors|| |74|Search a 2D Matrix|| |73|Set Matrix Zeroes|| |72|Edit Distance|| |71|Simplify Path|| |70|Climbing Stairs|| |69|Sqrt(x)|| |68|Text Justification|| |67|Add Binary|| |66|Plus One|| |65|Valid Number|| |64|Minimum Path Sum|| |63|Unique Paths II|| |62|Unique Paths|| |61|Rotate List|| |60|Permutation Sequence|| |59|Spiral Matrix II|| |58|Length of Last Word|| |57|Insert Interval|| |56|Merge Intervals|| |55|Jump Game|| |54|Spiral Matrix|| |53|Maximum Subarray|| |52|N-Queens II|| |51|N-Queens|| |50|Pow(x, n)|| |48|Rotate Image|| |47|Permutations II|| |46|Permutations|| |45|Jump Game II|| |44|Wildcard Matching|| |43|Multiply Strings|| |42|Trapping Rain Water|| |41|First Missing Positive|| |40|Combination Sum II|| |39|Combination Sum|| |38|Count and Say|| |37|Sudoku Solver|| |36|Valid Sudoku|| |35|Search Insert Position|| |33|Search in Rotated Sorted Array|| |32|Longest Valid Parentheses|| |31|Next Permutation|| |30|Substring with Concatenation of All Words|| |29|Divide Two Integers|| |28|Implement strStr()|| |27|Remove Element|| |26|Remove Duplicates from Sorted Array|| |25|Reverse Nodes in k-Group|| |24|Swap Nodes in Pairs|| |23|Merge k Sorted Lists|| |22|Generate Parentheses|| |21|Merge Two Sorted Lists|| |20|Valid Parentheses|| |19|Remove Nth Node From End of List|| |18|4Sum|| |17|Letter Combinations of a Phone Number|| |16|3Sum Closest|| |15|3Sum|| |14|Longest Common Prefix|| |13|Roman to Integer|| |12|Integer to Roman|| |11|Container With Most Water|| |10|Regular Expression Matching|| |9|Palindrome Number|| |8|String to Integer (atoi)|| |7|Reverse Integer|| |6|Zigzag Conversion|| |5|Longest Palindromic Substring|| |4|Median of Two Sorted Arrays|| |3|Longest Substring Without Repeating Characters|| |2|Add Two Numbers|| |1|Two Sum||

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.