Files
LeetCode-Go/website/content/ChapterTwo/Dynamic_Programming.md
halfrost 24ee84feaf Update
2021-10-08 20:01:23 -07:00

12 KiB

title type weight
2.07 Dynamic Programming docs 7

Dynamic Programming

No. Title Solution Difficulty TimeComplexity SpaceComplexity Favorite Acceptance
0005 Longest Palindromic Substring [Go]({{< relref "/ChapterFour/0001~0099/0005.Longest-Palindromic-Substring.md" >}}) Medium 31.3%
0022 Generate Parentheses [Go]({{< relref "/ChapterFour/0001~0099/0022.Generate-Parentheses.md" >}}) Medium 68.1%
0032 Longest Valid Parentheses [Go]({{< relref "/ChapterFour/0001~0099/0032.Longest-Valid-Parentheses.md" >}}) Hard 30.6%
0042 Trapping Rain Water [Go]({{< relref "/ChapterFour/0001~0099/0042.Trapping-Rain-Water.md" >}}) Hard 53.9%
0045 Jump Game II [Go]({{< relref "/ChapterFour/0001~0099/0045.Jump-Game-II.md" >}}) Medium 34.8%
0053 Maximum Subarray [Go]({{< relref "/ChapterFour/0001~0099/0053.Maximum-Subarray.md" >}}) Easy O(n) O(n) 48.8%
0055 Jump Game [Go]({{< relref "/ChapterFour/0001~0099/0055.Jump-Game.md" >}}) Medium 36.6%
0062 Unique Paths [Go]({{< relref "/ChapterFour/0001~0099/0062.Unique-Paths.md" >}}) Medium O(n^2) O(n^2) 57.9%
0063 Unique Paths II [Go]({{< relref "/ChapterFour/0001~0099/0063.Unique-Paths-II.md" >}}) Medium O(n^2) O(n^2) 36.5%
0064 Minimum Path Sum [Go]({{< relref "/ChapterFour/0001~0099/0064.Minimum-Path-Sum.md" >}}) Medium O(n^2) O(n^2) 57.9%
0070 Climbing Stairs [Go]({{< relref "/ChapterFour/0001~0099/0070.Climbing-Stairs.md" >}}) Easy O(n) O(n) 49.9%
0091 Decode Ways [Go]({{< relref "/ChapterFour/0001~0099/0091.Decode-Ways.md" >}}) Medium O(n) O(n) 28.7%
0095 Unique Binary Search Trees II [Go]({{< relref "/ChapterFour/0001~0099/0095.Unique-Binary-Search-Trees-II.md" >}}) Medium 47.1%
0096 Unique Binary Search Trees [Go]({{< relref "/ChapterFour/0001~0099/0096.Unique-Binary-Search-Trees.md" >}}) Medium O(n) O(n) 56.2%
0097 Interleaving String [Go]({{< relref "/ChapterFour/0001~0099/0097.Interleaving-String.md" >}}) Medium 34.0%
0115 Distinct Subsequences [Go]({{< relref "/ChapterFour/0100~0199/0115.Distinct-Subsequences.md" >}}) Hard 41.5%
0118 Pascal's Triangle [Go]({{< relref "/ChapterFour/0100~0199/0118.Pascals-Triangle.md" >}}) Easy 59.8%
0119 Pascal's Triangle II [Go]({{< relref "/ChapterFour/0100~0199/0119.Pascals-Triangle-II.md" >}}) Easy 54.7%
0120 Triangle [Go]({{< relref "/ChapterFour/0100~0199/0120.Triangle.md" >}}) Medium O(n^2) O(n) 48.4%
0121 Best Time to Buy and Sell Stock [Go]({{< relref "/ChapterFour/0100~0199/0121.Best-Time-to-Buy-and-Sell-Stock.md" >}}) Easy O(n) O(1) 52.8%
0122 Best Time to Buy and Sell Stock II [Go]({{< relref "/ChapterFour/0100~0199/0122.Best-Time-to-Buy-and-Sell-Stock-II.md" >}}) Medium 60.2%
0124 Binary Tree Maximum Path Sum [Go]({{< relref "/ChapterFour/0100~0199/0124.Binary-Tree-Maximum-Path-Sum.md" >}}) Hard 36.6%
0131 Palindrome Partitioning [Go]({{< relref "/ChapterFour/0100~0199/0131.Palindrome-Partitioning.md" >}}) Medium 55.5%
0152 Maximum Product Subarray [Go]({{< relref "/ChapterFour/0100~0199/0152.Maximum-Product-Subarray.md" >}}) Medium O(n) O(1) 33.6%
0174 Dungeon Game [Go]({{< relref "/ChapterFour/0100~0199/0174.Dungeon-Game.md" >}}) Hard 35.4%
0198 House Robber [Go]({{< relref "/ChapterFour/0100~0199/0198.House-Robber.md" >}}) Medium O(n) O(n) 44.7%
0213 House Robber II [Go]({{< relref "/ChapterFour/0200~0299/0213.House-Robber-II.md" >}}) Medium O(n) O(n) 38.6%
0264 Ugly Number II [Go]({{< relref "/ChapterFour/0200~0299/0264.Ugly-Number-II.md" >}}) Medium 44.0%
0279 Perfect Squares [Go]({{< relref "/ChapterFour/0200~0299/0279.Perfect-Squares.md" >}}) Medium 50.5%
0300 Longest Increasing Subsequence [Go]({{< relref "/ChapterFour/0300~0399/0300.Longest-Increasing-Subsequence.md" >}}) Medium O(n log n) O(n) 47.1%
0309 Best Time to Buy and Sell Stock with Cooldown [Go]({{< relref "/ChapterFour/0300~0399/0309.Best-Time-to-Buy-and-Sell-Stock-with-Cooldown.md" >}}) Medium O(n) O(n) 49.7%
0322 Coin Change [Go]({{< relref "/ChapterFour/0300~0399/0322.Coin-Change.md" >}}) Medium O(n) O(n) 38.9%
0329 Longest Increasing Path in a Matrix [Go]({{< relref "/ChapterFour/0300~0399/0329.Longest-Increasing-Path-in-a-Matrix.md" >}}) Hard 48.1%
0337 House Robber III [Go]({{< relref "/ChapterFour/0300~0399/0337.House-Robber-III.md" >}}) Medium 52.4%
0338 Counting Bits [Go]({{< relref "/ChapterFour/0300~0399/0338.Counting-Bits.md" >}}) Easy O(n) O(n) 71.8%
0343 Integer Break [Go]({{< relref "/ChapterFour/0300~0399/0343.Integer-Break.md" >}}) Medium O(n^2) O(n) 52.3%
0354 Russian Doll Envelopes [Go]({{< relref "/ChapterFour/0300~0399/0354.Russian-Doll-Envelopes.md" >}}) Hard 39.1%
0357 Count Numbers with Unique Digits [Go]({{< relref "/ChapterFour/0300~0399/0357.Count-Numbers-with-Unique-Digits.md" >}}) Medium O(1) O(1) 49.8%
0368 Largest Divisible Subset [Go]({{< relref "/ChapterFour/0300~0399/0368.Largest-Divisible-Subset.md" >}}) Medium 39.0%
0376 Wiggle Subsequence [Go]({{< relref "/ChapterFour/0300~0399/0376.Wiggle-Subsequence.md" >}}) Medium 43.3%
0377 Combination Sum IV [Go]({{< relref "/ChapterFour/0300~0399/0377.Combination-Sum-IV.md" >}}) Medium 47.8%
0392 Is Subsequence [Go]({{< relref "/ChapterFour/0300~0399/0392.Is-Subsequence.md" >}}) Easy O(n) O(1) 49.9%
0397 Integer Replacement [Go]({{< relref "/ChapterFour/0300~0399/0397.Integer-Replacement.md" >}}) Medium 34.0%
0410 Split Array Largest Sum [Go]({{< relref "/ChapterFour/0400~0499/0410.Split-Array-Largest-Sum.md" >}}) Hard 48.4%
0413 Arithmetic Slices [Go]({{< relref "/ChapterFour/0400~0499/0413.Arithmetic-Slices.md" >}}) Medium 61.0%
0416 Partition Equal Subset Sum [Go]({{< relref "/ChapterFour/0400~0499/0416.Partition-Equal-Subset-Sum.md" >}}) Medium O(n^2) O(n) 45.6%
0435 Non-overlapping Intervals [Go]({{< relref "/ChapterFour/0400~0499/0435.Non-overlapping-Intervals.md" >}}) Medium 46.1%
0473 Matchsticks to Square [Go]({{< relref "/ChapterFour/0400~0499/0473.Matchsticks-to-Square.md" >}}) Medium 40.2%
0474 Ones and Zeroes [Go]({{< relref "/ChapterFour/0400~0499/0474.Ones-and-Zeroes.md" >}}) Medium 43.9%
0494 Target Sum [Go]({{< relref "/ChapterFour/0400~0499/0494.Target-Sum.md" >}}) Medium 45.2%
0509 Fibonacci Number [Go]({{< relref "/ChapterFour/0500~0599/0509.Fibonacci-Number.md" >}}) Easy 67.8%
0518 Coin Change 2 [Go]({{< relref "/ChapterFour/0500~0599/0518.Coin-Change-2.md" >}}) Medium 54.8%
0526 Beautiful Arrangement [Go]({{< relref "/ChapterFour/0500~0599/0526.Beautiful-Arrangement.md" >}}) Medium 63.2%
0542 01 Matrix [Go]({{< relref "/ChapterFour/0500~0599/0542.01-Matrix.md" >}}) Medium 43.1%
0576 Out of Boundary Paths [Go]({{< relref "/ChapterFour/0500~0599/0576.Out-of-Boundary-Paths.md" >}}) Medium 39.7%
0583 Delete Operation for Two Strings [Go]({{< relref "/ChapterFour/0500~0599/0583.Delete-Operation-for-Two-Strings.md" >}}) Medium 53.5%
0638 Shopping Offers [Go]({{< relref "/ChapterFour/0600~0699/0638.Shopping-Offers.md" >}}) Medium 54.0%
0647 Palindromic Substrings [Go]({{< relref "/ChapterFour/0600~0699/0647.Palindromic-Substrings.md" >}}) Medium 63.5%
0714 Best Time to Buy and Sell Stock with Transaction Fee [Go]({{< relref "/ChapterFour/0700~0799/0714.Best-Time-to-Buy-and-Sell-Stock-with-Transaction-Fee.md" >}}) Medium O(n) O(1) 59.7%
0718 Maximum Length of Repeated Subarray [Go]({{< relref "/ChapterFour/0700~0799/0718.Maximum-Length-of-Repeated-Subarray.md" >}}) Medium 51.2%
0746 Min Cost Climbing Stairs [Go]({{< relref "/ChapterFour/0700~0799/0746.Min-Cost-Climbing-Stairs.md" >}}) Easy O(n) O(1) 55.4%
0823 Binary Trees With Factors [Go]({{< relref "/ChapterFour/0800~0899/0823.Binary-Trees-With-Factors.md" >}}) Medium 43.7%
0828 Count Unique Characters of All Substrings of a Given String [Go]({{< relref "/ChapterFour/0800~0899/0828.Count-Unique-Characters-of-All-Substrings-of-a-Given-String.md" >}}) Hard 47.4%
0834 Sum of Distances in Tree [Go]({{< relref "/ChapterFour/0800~0899/0834.Sum-of-Distances-in-Tree.md" >}}) Hard 52.2%
0838 Push Dominoes [Go]({{< relref "/ChapterFour/0800~0899/0838.Push-Dominoes.md" >}}) Medium O(n) O(n) 51.9%
0845 Longest Mountain in Array [Go]({{< relref "/ChapterFour/0800~0899/0845.Longest-Mountain-in-Array.md" >}}) Medium 39.3%
0877 Stone Game [Go]({{< relref "/ChapterFour/0800~0899/0877.Stone-Game.md" >}}) Medium 68.5%
0887 Super Egg Drop [Go]({{< relref "/ChapterFour/0800~0899/0887.Super-Egg-Drop.md" >}}) Hard 26.9%
0898 Bitwise ORs of Subarrays [Go]({{< relref "/ChapterFour/0800~0899/0898.Bitwise-ORs-of-Subarrays.md" >}}) Medium 36.0%
0907 Sum of Subarray Minimums [Go]({{< relref "/ChapterFour/0900~0999/0907.Sum-of-Subarray-Minimums.md" >}}) Medium 33.0%
0918 Maximum Sum Circular Subarray [Go]({{< relref "/ChapterFour/0900~0999/0918.Maximum-Sum-Circular-Subarray.md" >}}) Medium 35.4%
0920 Number of Music Playlists [Go]({{< relref "/ChapterFour/0900~0999/0920.Number-of-Music-Playlists.md" >}}) Hard 48.7%
0968 Binary Tree Cameras [Go]({{< relref "/ChapterFour/0900~0999/0968.Binary-Tree-Cameras.md" >}}) Hard 41.1%
0978 Longest Turbulent Subarray [Go]({{< relref "/ChapterFour/0900~0999/0978.Longest-Turbulent-Subarray.md" >}}) Medium 47.5%
0996 Number of Squareful Arrays [Go]({{< relref "/ChapterFour/0900~0999/0996.Number-of-Squareful-Arrays.md" >}}) Hard 48.9%
1025 Divisor Game [Go]({{< relref "/ChapterFour/1000~1099/1025.Divisor-Game.md" >}}) Easy O(1) O(1) 66.4%
1048 Longest String Chain [Go]({{< relref "/ChapterFour/1000~1099/1048.Longest-String-Chain.md" >}}) Medium 56.7%
1049 Last Stone Weight II [Go]({{< relref "/ChapterFour/1000~1099/1049.Last-Stone-Weight-II.md" >}}) Medium 49.1%
1105 Filling Bookcase Shelves [Go]({{< relref "/ChapterFour/1100~1199/1105.Filling-Bookcase-Shelves.md" >}}) Medium 57.8%
1137 N-th Tribonacci Number [Go]({{< relref "/ChapterFour/1100~1199/1137.N-th-Tribonacci-Number.md" >}}) Easy 60.0%
1143 Longest Common Subsequence [Go]({{< relref "/ChapterFour/1100~1199/1143.Longest-Common-Subsequence.md" >}}) Medium 58.9%
1235 Maximum Profit in Job Scheduling [Go]({{< relref "/ChapterFour/1200~1299/1235.Maximum-Profit-in-Job-Scheduling.md" >}}) Hard 50.2%
1463 Cherry Pickup II [Go]({{< relref "/ChapterFour/1400~1499/1463.Cherry-Pickup-II.md" >}}) Hard 68.5%
1641 Count Sorted Vowel Strings [Go]({{< relref "/ChapterFour/1600~1699/1641.Count-Sorted-Vowel-Strings.md" >}}) Medium 75.0%
1646 Get Maximum in Generated Array [Go]({{< relref "/ChapterFour/1600~1699/1646.Get-Maximum-in-Generated-Array.md" >}}) Easy 51.5%
1653 Minimum Deletions to Make String Balanced [Go]({{< relref "/ChapterFour/1600~1699/1653.Minimum-Deletions-to-Make-String-Balanced.md" >}}) Medium 53.8%
1654 Minimum Jumps to Reach Home [Go]({{< relref "/ChapterFour/1600~1699/1654.Minimum-Jumps-to-Reach-Home.md" >}}) Medium 25.1%
1655 Distribute Repeating Integers [Go]({{< relref "/ChapterFour/1600~1699/1655.Distribute-Repeating-Integers.md" >}}) Hard 40.8%
1659 Maximize Grid Happiness [Go]({{< relref "/ChapterFour/1600~1699/1659.Maximize-Grid-Happiness.md" >}}) Hard 36.7%
1664 Ways to Make a Fair Array [Go]({{< relref "/ChapterFour/1600~1699/1664.Ways-to-Make-a-Fair-Array.md" >}}) Medium 62.4%
1681 Minimum Incompatibility [Go]({{< relref "/ChapterFour/1600~1699/1681.Minimum-Incompatibility.md" >}}) Hard 36.4%
1690 Stone Game VII [Go]({{< relref "/ChapterFour/1600~1699/1690.Stone-Game-VII.md" >}}) Medium 58.9%
1691 Maximum Height by Stacking Cuboids [Go]({{< relref "/ChapterFour/1600~1699/1691.Maximum-Height-by-Stacking-Cuboids.md" >}}) Hard 52.0%
1696 Jump Game VI [Go]({{< relref "/ChapterFour/1600~1699/1696.Jump-Game-VI.md" >}}) Medium 42.1%
------------ ------------------------------------------------------- ------- ---------------- --------------- ------------- ------------- -------------