Skip to content
LEETFLIX

method

Dynamic Programming — animated LeetCode walkthroughs

LeetCode problems solved with Dynamic Programming. Browse the complete tag, then watch the algorithm move — step-by-step animation, Python and Go.

680 problems · 598 animated · 82 locked

Start with a walkthrough

Full DP index

  1. 5Longest Palindromic SubstringWatch
  2. 10Regular Expression MatchingWatch
  3. 22Generate ParenthesesWatch
  4. 32Longest Valid ParenthesesWatch
  5. 42Trapping Rain WaterWatch
  6. 44Wildcard MatchingWatch
  7. 45Jump Game IIWatch
  8. 53Maximum SubarrayWatch
  9. 55Jump GameWatch
  10. 62Unique PathsWatch
  11. 63Unique Paths IIWatch
  12. 64Minimum Path SumWatch
  13. 70Climbing StairsWatch
  14. 72Edit DistanceWatch
  15. 85Maximal RectangleWatch
  16. 87Scramble StringWatch
  17. 91Decode WaysWatch
  18. 95Unique Binary Search Trees IIWatch
  19. 96Unique Binary Search TreesWatch
  20. 97Interleaving StringWatch
  21. 115Distinct SubsequencesWatch
  22. 118Pascal's TriangleWatch
  23. 119Pascal's Triangle IIWatch
  24. 120TriangleWatch
  25. 121Best Time to Buy and Sell StockWatch
  26. 122Best Time to Buy and Sell Stock IIWatch
  27. 123Best Time to Buy and Sell Stock IIIWatch
  28. 124Binary Tree Maximum Path SumWatch
  29. 131Palindrome PartitioningWatch
  30. 132Palindrome Partitioning IIWatch
  31. 139Word BreakWatch
  32. 140Word Break IIWatch
  33. 152Maximum Product SubarrayWatch
  34. 174Dungeon GameWatch
  35. 188Best Time to Buy and Sell Stock IVWatch
  36. 198House RobberWatch
  37. 213House Robber IIWatch
  38. 221Maximal SquareWatch
  39. 233Number of Digit OneWatch
  40. 241Different Ways to Add ParenthesesWatch
  41. 256Paint HouseLocked
  42. 264Ugly Number IIWatch
  43. 265Paint House IILocked
  44. 276Paint FenceLocked
  45. 279Perfect SquaresWatch
  46. 294Flip Game IILocked
  47. 300Longest Increasing SubsequenceWatch
  48. 309Best Time to Buy and Sell Stock with CooldownWatch
  49. 312Burst BalloonsWatch
  50. 313Super Ugly NumberWatch
  51. 322Coin ChangeWatch
  52. 329Longest Increasing Path in a MatrixWatch
  53. 333Largest BST SubtreeLocked
  54. 337House Robber IIIWatch
  55. 338Counting BitsWatch
  56. 343Integer BreakWatch
  57. 351Android Unlock PatternsLocked
  58. 354Russian Doll EnvelopesWatch
  59. 357Count Numbers with Unique DigitsWatch
  60. 361Bomb EnemyLocked
  61. 368Largest Divisible SubsetWatch
  62. 375Guess Number Higher or Lower IIWatch
  63. 376Wiggle SubsequenceWatch
  64. 377Combination Sum IVWatch
  65. 392Is SubsequenceWatch
  66. 396Rotate FunctionWatch
  67. 397Integer ReplacementWatch
  68. 403Frog JumpWatch
  69. 410Split Array Largest SumWatch
  70. 413Arithmetic SlicesWatch
  71. 416Partition Equal Subset SumWatch
  72. 418Sentence Screen FittingLocked
  73. 435Non-overlapping IntervalsWatch
  74. 446Arithmetic Slices II - SubsequenceWatch
  75. 458Poor PigsWatch
  76. 464Can I WinWatch
  77. 465Optimal Account BalancingLocked
  78. 466Count The RepetitionsWatch
  79. 467Unique Substrings in Wraparound StringWatch
  80. 471Encode String with Shortest LengthLocked
  81. 472Concatenated WordsWatch
  82. 473Matchsticks to SquareWatch
  83. 474Ones and ZeroesWatch
  84. 486Predict the WinnerWatch
  85. 487Max Consecutive Ones IILocked
  86. 488Zuma GameWatch
  87. 494Target SumWatch
  88. 509Fibonacci NumberWatch
  89. 514Freedom TrailWatch
  90. 516Longest Palindromic SubsequenceWatch
  91. 518Coin Change IIWatch
  92. 526Beautiful ArrangementWatch
  93. 54201 MatrixWatch
  94. 546Remove BoxesWatch
  95. 552Student Attendance Record IIWatch
  96. 553Optimal DivisionWatch
  97. 562Longest Line of Consecutive One in MatrixLocked
  98. 568Maximum Vacation DaysLocked
  99. 576Out of Boundary PathsWatch
  100. 583Delete Operation for Two StringsWatch
  101. 600Non-negative Integers without Consecutive OnesWatch
  102. 629K Inverse Pairs ArrayWatch
  103. 634Find the Derangement of An ArrayLocked
  104. 638Shopping OffersWatch
  105. 639Decode Ways IIWatch
  106. 646Maximum Length of Pair ChainWatch
  107. 647Palindromic SubstringsWatch
  108. 6502 Keys KeyboardWatch
  109. 6514 Keys KeyboardLocked
  110. 656Coin PathLocked
  111. 664Strange PrinterWatch
  112. 673Number of Longest Increasing SubsequenceWatch
  113. 678Valid Parenthesis StringWatch
  114. 688Knight Probability in ChessboardWatch
  115. 689Maximum Sum of 3 Non-Overlapping SubarraysWatch
  116. 691Stickers to Spell WordWatch
  117. 698Partition to K Equal Sum SubsetsWatch
  118. 712Minimum ASCII Delete Sum for Two StringsWatch
  119. 714Best Time to Buy and Sell Stock with Transaction FeeWatch
  120. 718Maximum Length of Repeated SubarrayWatch
  121. 727Minimum Window SubsequenceLocked
  122. 730Count Different Palindromic SubsequencesWatch
  123. 740Delete and EarnWatch
  124. 741Cherry PickupWatch
  125. 746Min Cost Climbing StairsWatch
  126. 750Number Of Corner RectanglesLocked
  127. 764Largest Plus SignWatch
  128. 773Sliding PuzzleWatch
  129. 787Cheapest Flights Within K StopsWatch
  130. 788Rotated DigitsWatch
  131. 790Domino and Tromino TilingWatch
  132. 792Number of Matching SubsequencesWatch
  133. 799Champagne TowerWatch
  134. 801Minimum Swaps To Make Sequences IncreasingWatch
  135. 805Split Array With Same AverageWatch
  136. 808Soup ServingsWatch
  137. 813Largest Sum of AveragesWatch
  138. 818Race CarWatch
  139. 823Binary Trees With FactorsWatch
  140. 828Count Unique Characters of All Substrings of a Given StringWatch
  141. 834Sum of Distances in TreeWatch
  142. 837New 21 GameWatch
  143. 838Push DominoesWatch
  144. 845Longest Mountain in ArrayWatch
  145. 847Shortest Path Visiting All NodesWatch
  146. 871Minimum Number of Refueling StopsWatch
  147. 873Length of Longest Fibonacci SubsequenceWatch
  148. 877Stone GameWatch
  149. 879Profitable SchemesWatch
  150. 887Super Egg DropWatch
  151. 894All Possible Full Binary TreesWatch
  152. 898Bitwise ORs of SubarraysWatch
  153. 902Numbers At Most N Given Digit SetWatch
  154. 903Valid Permutations for DI SequenceWatch
  155. 907Sum of Subarray MinimumsWatch
  156. 913Cat and MouseWatch
  157. 918Maximum Sum Circular SubarrayWatch
  158. 920Number of Music PlaylistsWatch
  159. 926Flip String to Monotone IncreasingWatch
  160. 931Minimum Falling Path SumWatch
  161. 935Knight DialerWatch
  162. 940Distinct Subsequences IIWatch
  163. 943Find the Shortest SuperstringWatch
  164. 956Tallest BillboardWatch
  165. 960Delete Columns to Make Sorted IIIWatch
  166. 964Least Operators to Express NumberWatch
  167. 968Binary Tree CamerasWatch
  168. 975Odd Even JumpWatch
  169. 978Longest Turbulent SubarrayWatch
  170. 983Minimum Cost For TicketsWatch
  171. 996Number of Squareful ArraysWatch
  172. 1000Minimum Cost to Merge StonesWatch
  173. 1012Numbers With Repeated DigitsWatch
  174. 1014Best Sightseeing PairWatch
  175. 1024Video StitchingWatch
  176. 1025Divisor GameWatch
  177. 1027Longest Arithmetic SubsequenceWatch
  178. 1031Maximum Sum of Two Non-Overlapping SubarraysWatch
  179. 1035Uncrossed LinesWatch
  180. 1039Minimum Score Triangulation of PolygonWatch
  181. 1043Partition Array for Maximum SumWatch
  182. 1048Longest String ChainWatch
  183. 1049Last Stone Weight IIWatch
  184. 1062Longest Repeating SubstringLocked
  185. 1066Campus Bikes IILocked
  186. 1067Digit Count in RangeLocked
  187. 1092Shortest Common Supersequence Watch
  188. 1105Filling Bookcase ShelvesWatch
  189. 1125Smallest Sufficient TeamWatch
  190. 1130Minimum Cost Tree From Leaf ValuesWatch
  191. 1137N-th Tribonacci NumberWatch
  192. 1139Largest 1-Bordered SquareWatch
  193. 1140Stone Game IIWatch
  194. 1143Longest Common SubsequenceWatch
  195. 1147Longest Chunked Palindrome DecompositionWatch
  196. 1155Number of Dice Rolls With Target SumWatch
  197. 1162As Far from Land as PossibleWatch
  198. 1182Shortest Distance to Target ColorLocked
  199. 1186Maximum Subarray Sum with One DeletionWatch
  200. 1187Make Array Strictly IncreasingWatch
  201. 1191K-Concatenation Maximum SumWatch
  202. 1216Valid Palindrome IIILocked
  203. 1218Longest Arithmetic Subsequence of Given DifferenceWatch
  204. 1220Count Vowels PermutationWatch
  205. 1223Dice Roll SimulationWatch
  206. 1227Airplane Seat Assignment ProbabilityWatch
  207. 1230Toss Strange CoinsLocked
  208. 1235Maximum Profit in Job SchedulingWatch
  209. 1246Palindrome RemovalLocked
  210. 1255Maximum Score Words Formed by LettersWatch
  211. 1259Handshakes That Don't CrossLocked
  212. 1262Greatest Sum Divisible by ThreeWatch
  213. 1269Number of Ways to Stay in the Same Place After Some StepsWatch
  214. 1277Count Square Submatrices with All OnesWatch
  215. 1278Palindrome Partitioning IIIWatch
  216. 1289Minimum Falling Path Sum IIWatch
  217. 1301Number of Paths with Max ScoreWatch
  218. 1312Minimum Insertion Steps to Make a String PalindromeWatch
  219. 1320Minimum Distance to Type a Word Using Two FingersWatch
  220. 1326Minimum Number of Taps to Open to Water a GardenWatch
  221. 1334Find the City With the Smallest Number of Neighbors at a Threshold DistanceWatch
  222. 1335Minimum Difficulty of a Job ScheduleWatch
  223. 1340Jump Game VWatch
  224. 1349Maximum Students Taking ExamWatch
  225. 1359Count All Valid Pickup and Delivery OptionsWatch
  226. 1363Largest Multiple of ThreeWatch
  227. 1372Longest ZigZag Path in a Binary TreeWatch
  228. 1373Maximum Sum BST in Binary TreeWatch
  229. 1387Sort Integers by The Power ValueWatch
  230. 1388Pizza With 3n SlicesWatch
  231. 1395Count Number of TeamsWatch
  232. 1397Find All Good StringsWatch
  233. 1402Reducing DishesWatch
  234. 1406Stone Game IIIWatch
  235. 1411Number of Ways to Paint N × 3 GridWatch
  236. 1416Restore The ArrayWatch
  237. 1420Build Array Where You Can Find The Maximum Exactly K ComparisonsWatch
  238. 1425Constrained Subsequence SumWatch
  239. 1434Number of Ways to Wear Different Hats to Each OtherWatch
  240. 1444Number of Ways of Cutting a PizzaWatch
  241. 1449Form Largest Integer With Digits That Add up to TargetWatch
  242. 1458Max Dot Product of Two SubsequencesWatch
  243. 1463Cherry Pickup IIWatch
  244. 1467Probability of a Two Boxes Having The Same Number of Distinct BallsWatch
  245. 1473Paint House IIIWatch
  246. 1477Find Two Non-overlapping Sub-arrays Each With Target SumWatch
  247. 1478Allocate MailboxesWatch
  248. 1483Kth Ancestor of a Tree NodeWatch
  249. 1493Longest Subarray of 1's After Deleting One ElementWatch
  250. 1494Parallel Courses IIWatch
  251. 1504Count Submatrices With All OnesWatch
  252. 1510Stone Game IVWatch
  253. 1524Number of Sub-arrays With Odd SumWatch
  254. 1525Number of Good Ways to Split a StringWatch
  255. 1526Minimum Number of Increments on Subarrays to Form a Target ArrayWatch
  256. 1531String Compression IIWatch
  257. 1537Get the Maximum ScoreWatch
  258. 1547Minimum Cost to Cut a StickWatch
  259. 1548The Most Similar Path in a GraphLocked
  260. 1553Minimum Number of Days to Eat N OrangesWatch
  261. 1563Stone Game VWatch
  262. 1567Maximum Length of Subarray With Positive ProductWatch
  263. 1569Number of Ways to Reorder Array to Get Same BSTWatch
  264. 1575Count All Possible RoutesWatch
  265. 1578Minimum Time to Make Rope ColorfulWatch
  266. 1594Maximum Non Negative Product in a MatrixWatch
  267. 1595Minimum Cost to Connect Two Groups of PointsWatch
  268. 1611Minimum One Bit Operations to Make Integers ZeroWatch
  269. 1617Count Subtrees With Max Distance Between CitiesWatch
  270. 1621Number of Sets of K Non-Overlapping Line SegmentsWatch
  271. 1626Best Team With No ConflictsWatch
  272. 1638Count Substrings That Differ by One CharacterWatch
  273. 1639Number of Ways to Form a Target String Given a DictionaryWatch
  274. 1641Count Sorted Vowel StringsWatch
  275. 1643Kth Smallest InstructionsWatch
  276. 1653Minimum Deletions to Make String BalancedWatch
  277. 1655Distribute Repeating IntegersWatch
  278. 1659Maximize Grid HappinessWatch
  279. 1668Maximum Repeating SubstringWatch
  280. 1671Minimum Number of Removals to Make Mountain ArrayWatch
  281. 1681Minimum IncompatibilityWatch
  282. 1682Longest Palindromic Subsequence IILocked
  283. 1687Delivering Boxes from Storage to PortsWatch
  284. 1690Stone Game VIIWatch
  285. 1691Maximum Height by Stacking Cuboids Watch
  286. 1692Count Ways to Distribute CandiesLocked
  287. 1696Jump Game VIWatch
  288. 1714Sum Of Special Evenly-Spaced Elements In ArrayLocked
  289. 1723Find Minimum Time to Finish All JobsWatch
  290. 1728Cat and Mouse IIWatch
  291. 1735Count Ways to Make Array With ProductWatch
  292. 1745Palindrome Partitioning IVWatch
  293. 1746Maximum Subarray Sum After One OperationLocked
  294. 1749Maximum Absolute Sum of Any SubarrayWatch
  295. 1751Maximum Number of Events That Can Be Attended IIWatch
  296. 1755Closest Subsequence SumWatch
  297. 1770Maximum Score from Performing Multiplication OperationsWatch
  298. 1771Maximize Palindrome Length From SubsequencesWatch
  299. 1774Closest Dessert CostWatch
  300. 1786Number of Restricted Paths From First to Last NodeWatch
  301. 1787Make the XOR of All Segments Equal to ZeroWatch
  302. 1799Maximize Score After N OperationsWatch
  303. 1815Maximum Number of Groups Getting Fresh DonutsWatch
  304. 1824Minimum Sideway JumpsWatch
  305. 1857Largest Color Value in a Directed GraphWatch
  306. 1866Number of Ways to Rearrange Sticks With K Sticks VisibleWatch
  307. 1871Jump Game VIIWatch
  308. 1872Stone Game VIIIWatch
  309. 1879Minimum XOR Sum of Two ArraysWatch
  310. 1883Minimum Skips to Arrive at Meeting On TimeWatch
  311. 1884Egg Drop With 2 Eggs and N FloorsWatch
  312. 1888Minimum Number of Flips to Make the Binary String AlternatingWatch
  313. 1896Minimum Cost to Change the Final Value of ExpressionWatch
  314. 1900The Earliest and Latest Rounds Where Players CompeteWatch
  315. 1908Game of NimLocked
  316. 1911Maximum Alternating Subsequence SumWatch
  317. 1916Count Ways to Build Rooms in an Ant ColonyWatch
  318. 1928Minimum Cost to Reach Destination in TimeWatch
  319. 1931Painting a Grid With Three Different ColorsWatch
  320. 1937Maximum Number of Points with CostWatch
  321. 1947Maximum Compatibility Score SumWatch
  322. 1955Count Number of Special SubsequencesWatch
  323. 1959Minimum Total Space Wasted With K Resizing OperationsWatch
  324. 1976Number of Ways to Arrive at DestinationWatch
  325. 1977Number of Ways to Separate NumbersWatch
  326. 1981Minimize the Difference Between Target and Chosen ElementsWatch
  327. 1986Minimum Number of Work Sessions to Finish the TasksWatch
  328. 1987Number of Unique Good SubsequencesWatch
  329. 1994The Number of Good SubsetsWatch
  330. 1997First Day Where You Have Been in All the RoomsWatch
  331. 2002Maximum Product of the Length of Two Palindromic SubsequencesWatch
  332. 2003Smallest Missing Genetic Value in Each SubtreeWatch
  333. 2005Subtree Removal Game with Fibonacci TreeLocked
  334. 2008Maximum Earnings From TaxiWatch
  335. 2019The Score of Students Solving Math ExpressionWatch
  336. 2035Partition Array Into Two Arrays to Minimize Sum DifferenceWatch
  337. 2036Maximum Alternating Subarray SumLocked
  338. 2050Parallel Courses IIIWatch
  339. 2052Minimum Cost to Separate Sentence Into RowsLocked
  340. 2054Two Best Non-Overlapping EventsWatch
  341. 2060Check if an Original String Exists Given Two Encoded StringsWatch
  342. 2063Vowels of All SubstringsWatch
  343. 2086Minimum Number of Food Buckets to Feed the HamstersWatch
  344. 2088Count Fertile Pyramids in a LandWatch
  345. 2100Find Good Days to Rob the BankWatch
  346. 2110Number of Smooth Descent Periods of a StockWatch
  347. 2127Maximum Employees to Be Invited to a MeetingWatch
  348. 2140Solving Questions With BrainpowerWatch
  349. 2143Choose Numbers From Two Arrays in RangeLocked
  350. 2147Number of Ways to Divide a Long CorridorWatch
  351. 2152Minimum Number of Lines to Cover PointsLocked
  352. 2163Minimum Difference in Sums After Removal of ElementsWatch
  353. 2167Minimum Time to Remove All Cars Containing Illegal GoodsWatch
  354. 2172Maximum AND Sum of ArrayWatch
  355. 2184Number of Ways to Build Sturdy Brick WallLocked
  356. 2188Minimum Time to Finish the RaceWatch
  357. 2189Number of Ways to Build House of CardsLocked
  358. 2209Minimum White Tiles After Covering With CarpetsWatch
  359. 2218Maximum Value of K Coins From PilesWatch
  360. 2222Number of Ways to Select BuildingsWatch
  361. 2247Maximum Cost of Trip With K HighwaysLocked
  362. 2262Total Appeal of A StringWatch
  363. 2263Make Array Non-decreasing or Non-increasingLocked
  364. 2266Count Number of TextsWatch
  365. 2267 Check if There Is a Valid Parentheses String PathWatch
  366. 2272Substring With Largest VarianceWatch
  367. 2289Steps to Make Array Non-decreasingWatch
  368. 2291Maximum Profit From Trading StocksLocked
  369. 2297Jump Game VIIILocked
  370. 2304Minimum Path Cost in a GridWatch
  371. 2305Fair Distribution of CookiesWatch
  372. 2310Sum of Numbers With Units Digit KWatch
  373. 2311Longest Binary Subsequence Less Than or Equal to KWatch
  374. 2312Selling Pieces of WoodWatch
  375. 2313Minimum Flips in Binary Tree to Get ResultLocked
  376. 2318Number of Distinct Roll SequencesWatch
  377. 2320Count Number of Ways to Place HousesWatch
  378. 2321Maximum Score Of Spliced ArrayWatch
  379. 2327Number of People Aware of a SecretWatch
  380. 2328Number of Increasing Paths in a GridWatch
  381. 2338Count the Number of Ideal ArraysWatch
  382. 2355Maximum Number of Books You Can TakeLocked
  383. 2361Minimum Costs Using the Train LineLocked
  384. 2369Check if There is a Valid Partition For The ArrayWatch
  385. 2370Longest Ideal SubsequenceWatch
  386. 2376Count Special IntegersWatch
  387. 2378Choose Edges to Maximize Score in a TreeLocked
  388. 2380Time Needed to Rearrange a Binary StringWatch
  389. 2393Count Strictly Increasing SubarraysLocked
  390. 2400Number of Ways to Reach a Position After Exactly k StepsWatch
  391. 2403Minimum Time to Kill All MonstersLocked
  392. 2407Longest Increasing Subsequence IIWatch
  393. 2420Find All Good IndicesWatch
  394. 2430Maximum Deletions on a StringWatch
  395. 2431Maximize Total Tastiness of Purchased FruitsLocked
  396. 2435Paths in Matrix Whose Sum Is Divisible by KWatch
  397. 2436Minimum Split Into Subarrays With GCD Greater Than OneLocked
  398. 2439Minimize Maximum of ArrayWatch
  399. 2463Minimum Total Distance TraveledWatch
  400. 2464Minimum Subarrays in a Valid SplitLocked
  401. 2466Count Ways To Build Good StringsWatch
  402. 2472Maximum Number of Non-overlapping Palindrome SubstringsWatch
  403. 2478Number of Beautiful PartitionsWatch
  404. 2484Count Palindromic SubsequencesWatch
  405. 2495Number of Subarrays Having Even ProductLocked
  406. 2501Longest Square Streak in an ArrayWatch
  407. 2510Check if There is a Path With Equal Number of 0's And 1'sLocked
  408. 2518Number of Great PartitionsWatch
  409. 2522Partition String Into Substrings With Values at Most KWatch
  410. 2533Number of Good Binary StringsLocked
  411. 2538Difference Between Maximum and Minimum Price SumWatch
  412. 2547Minimum Cost to Split an ArrayWatch
  413. 2552Count Increasing QuadrupletsWatch
  414. 2556Disconnect Path in a Binary Matrix by at Most One FlipWatch
  415. 2560House Robber IVWatch
  416. 2571Minimum Operations to Reduce an Integer to 0Watch
  417. 2572Count the Number of Square-Free SubsetsWatch
  418. 2573Find the String with LCPWatch
  419. 2581Count Number of Possible Root NodesWatch
  420. 2585Number of Ways to Earn PointsWatch
  421. 2597The Number of Beautiful SubsetsWatch
  422. 2606Find the Substring With Maximum CostWatch
  423. 2616Minimize the Maximum Difference of PairsWatch
  424. 2617Minimum Number of Visited Cells in a GridWatch
  425. 2638Count the Number of K-Free SubsetsLocked
  426. 2645Minimum Additions to Make Valid StringWatch
  427. 2646Minimize the Total Price of the TripsWatch
  428. 2673Make Costs of Paths Equal in a Binary TreeWatch
  429. 2681Power of HeroesWatch
  430. 2684Maximum Number of Moves in a GridWatch
  431. 2707Extra Characters in a StringWatch
  432. 2708Maximum Strength of a GroupWatch
  433. 2712Minimum Cost to Make All Characters EqualWatch
  434. 2713Maximum Strictly Increasing Cells in a MatrixWatch
  435. 2719Count of IntegersWatch
  436. 2741Special PermutationsWatch
  437. 2742Painting the WallsWatch
  438. 2745Construct the Longest New StringWatch
  439. 2746Decremental String ConcatenationWatch
  440. 2750Ways to Split Array Into Good SubarraysWatch
  441. 2767Partition String Into Minimum Beautiful SubstringsWatch
  442. 2770Maximum Number of Jumps to Reach the Last IndexWatch
  443. 2771Longest Non-decreasing Subarray From Two ArraysWatch
  444. 2786Visit Array Positions to Maximize ScoreWatch
  445. 2787Ways to Express an Integer as Sum of PowersWatch
  446. 2801Count Stepping Numbers in RangeWatch
  447. 2809Minimum Time to Make Array Sum At Most xWatch
  448. 2811Check if it is Possible to Split ArrayWatch
  449. 2826Sorting Three GroupsWatch
  450. 2827Number of Beautiful Integers in the RangeWatch
  451. 2830Maximize the Profit as the SalesmanWatch
  452. 2836Maximize Value of Function in a Ball Passing GameWatch
  453. 2846Minimum Edge Weight Equilibrium Queries in a TreeWatch
  454. 2850Minimum Moves to Spread Stones Over GridWatch
  455. 2851String TransformationWatch
  456. 2858Minimum Edge Reversals So Every Node Is ReachableWatch
  457. 2867Count Valid Paths in a TreeWatch
  458. 2876Count Visited Nodes in a Directed GraphWatch
  459. 2892Minimizing Array After Replacing Pairs With Their ProductLocked
  460. 2896Apply Operations to Make Two Strings EqualWatch
  461. 2900Longest Unequal Adjacent Groups Subsequence IWatch
  462. 2901Longest Unequal Adjacent Groups Subsequence IIWatch
  463. 2902Count of Sub-Multisets With Bounded SumWatch
  464. 2911Minimum Changes to Make K Semi-palindromesWatch
  465. 2912Number of Ways to Reach Destination in the GridLocked
  466. 2915Length of the Longest Subsequence That Sums to TargetWatch
  467. 2919Minimum Increment Operations to Make Array BeautifulWatch
  468. 2920Maximum Points After Collecting Coins From All NodesWatch
  469. 2925Maximum Score After Applying Operations on a TreeWatch
  470. 2926Maximum Balanced Subsequence SumWatch
  471. 2930Number of Strings Which Can Be Rearranged to Contain SubstringWatch
  472. 2944Minimum Number of Coins for FruitsWatch
  473. 2945Find Maximum Non-decreasing Array LengthWatch
  474. 2957Remove Adjacent Almost-Equal CharactersWatch
  475. 2969Minimum Number of Coins for Fruits IILocked
  476. 2973Find Number of Coins to Place in Tree NodesWatch
  477. 2977Minimum Cost to Convert String IIWatch
  478. 2979Most Expensive Item That Can Not Be BoughtLocked
  479. 2992Number of Self-Divisible PermutationsLocked
  480. 2998Minimum Number of Operations to Make X and Y EqualWatch
  481. 2999Count the Number of Powerful IntegersWatch
  482. 3003Maximize the Number of Partitions After OperationsWatch
  483. 3004Maximum Subtree of the Same ColorLocked
  484. 3007Maximum Number That Sum of the Prices Is Less Than or Equal to KWatch
  485. 3018Maximum Number of Removal Queries That Can Be Processed ILocked
  486. 3032Count Numbers With Unique Digits IILocked
  487. 3040Maximum Number of Operations With the Same Score IIWatch
  488. 3041Maximize Consecutive Elements in an Array After ModificationWatch
  489. 3068Find the Maximum Sum of Node ValuesWatch
  490. 3077Maximum Strength of K Disjoint SubarraysWatch
  491. 3082Find the Sum of the Power of All SubsequencesWatch
  492. 3098Find the Sum of Subsequence PowersWatch
  493. 3117Minimum Sum of Values by Dividing ArrayWatch
  494. 3122Minimum Number of Operations to Satisfy ConditionsWatch
  495. 3129Find All Possible Stable Binary Arrays IWatch
  496. 3130Find All Possible Stable Binary Arrays IIWatch
  497. 3135Equalize Strings by Adding or Removing Characters at EndsLocked
  498. 3144Minimum Substring Partition of Equal Character FrequencyWatch
  499. 3147Taking Maximum Energy From the Mystic DungeonWatch
  500. 3148Maximum Difference Score in a GridWatch
  501. 3149Find the Minimum Cost Array PermutationWatch
  502. 3154Find Number of Ways to Reach the K-th StairWatch
  503. 3165Maximum Sum of Subsequence With Non-adjacent ElementsWatch
  504. 3176Find the Maximum Length of a Good Subsequence IWatch
  505. 3177Find the Maximum Length of a Good Subsequence IIWatch
  506. 3180Maximum Total Reward Using Operations IWatch
  507. 3181Maximum Total Reward Using Operations IIWatch
  508. 3183The Number of Ways to Make the SumLocked
  509. 3186Maximum Total Damage With Spell CastingWatch
  510. 3192Minimum Operations to Make Binary Array Elements Equal to One IIWatch
  511. 3193Count the Number of InversionsWatch
  512. 3196Maximize Total Cost of Alternating SubarraysWatch
  513. 3201Find the Maximum Length of Valid Subsequence IWatch
  514. 3202Find the Maximum Length of Valid Subsequence IIWatch
  515. 3205Maximum Array Hopping Score ILocked
  516. 3213Construct String with Minimum CostWatch
  517. 3218Minimum Cost for Cutting Cake IWatch
  518. 3225Maximum Score From Grid OperationsWatch
  519. 3229Minimum Operations to Make Array Equal to TargetWatch
  520. 3241Time Taken to Mark All NodesWatch
  521. 3247Number of Subsequences with Odd SumLocked
  522. 3250Find the Count of Monotonic Pairs IWatch
  523. 3251Find the Count of Monotonic Pairs IIWatch
  524. 3256Maximum Value Sum by Placing Three Rooks IWatch
  525. 3257Maximum Value Sum by Placing Three Rooks IIWatch
  526. 3259Maximum Energy Boost From Two DrinksWatch
  527. 3260Find the Largest Palindrome Divisible by KWatch
  528. 3269Constructing Two Increasing ArraysLocked
  529. 3276Select Cells in Grid With Maximum ScoreWatch
  530. 3277Maximum XOR Score Subarray QueriesWatch
  531. 3284Sum of Consecutive SubarraysLocked
  532. 3287Find the Maximum Sequence Value of ArrayWatch
  533. 3290Maximum Multiplication ScoreWatch
  534. 3291Minimum Number of Valid Strings to Form Target IWatch
  535. 3292Minimum Number of Valid Strings to Form Target IIWatch
  536. 3299Sum of Consecutive SubsequencesLocked
  537. 3302Find the Lexicographically Smallest Valid SequenceWatch
  538. 3316Find Maximum Removals From Source StringWatch
  539. 3317Find the Number of Possible Ways for an EventWatch
  540. 3320Count The Number of Winning SequencesWatch
  541. 3332Maximum Points Tourist Can EarnWatch
  542. 3333Find the Original Typed String IIWatch
  543. 3335Total Characters in String After Transformations IWatch
  544. 3336Find the Number of Subsequences With Equal GCDWatch
  545. 3337Total Characters in String After Transformations IIWatch
  546. 3339Find the Number of K-Even ArraysLocked
  547. 3343Count Number of Balanced PermutationsWatch
  548. 3351Sum of Good SubsequencesWatch
  549. 3352Count K-Reducible Numbers Less Than NWatch
  550. 3363Find the Maximum Number of Fruits CollectedWatch
  551. 3366Minimum Array SumWatch
  552. 3367Maximize Sum of Weights after Edge RemovalsWatch
  553. 3376Minimum Time to Break Locks IWatch
  554. 3388Count Beautiful Splits in an ArrayWatch
  555. 3389Minimum Operations to Make Character Frequencies EqualWatch
  556. 3393Count Paths With the Given XOR ValueWatch
  557. 3409Longest Subsequence With Decreasing Adjacent DifferenceWatch
  558. 3410Maximize Subarray Sum After Removing All Occurrences of One ElementWatch
  559. 3414Maximum Score of Non-overlapping IntervalsWatch
  560. 3418Maximum Amount of Money Robot Can EarnWatch
  561. 3428Maximum and Minimum Sums of at Most Size K SubsequencesWatch
  562. 3429Paint House IVWatch
  563. 3434Maximum Frequency After Subarray OperationWatch
  564. 3441Minimum Cost Good CaptionWatch
  565. 3444Minimum Increments for Target Multiples in an ArrayWatch
  566. 3448Count Substrings Divisible By Last DigitWatch
  567. 3458Select K Disjoint Special SubstringsWatch
  568. 3459Length of Longest V-Shaped Diagonal SegmentWatch
  569. 3466Maximum Coin Collection Locked
  570. 3469Find Minimum Cost to Remove Array ElementsWatch
  571. 3472Longest Palindromic Subsequence After at Most K OperationsWatch
  572. 3473Sum of K Subarrays With Length at Least MWatch
  573. 3489Zero Array Transformation IVWatch
  574. 3490Count Beautiful NumbersWatch
  575. 3500Minimum Cost to Divide Array Into SubarraysWatch
  576. 3503Longest Palindrome After Substring Concatenation IWatch
  577. 3504Longest Palindrome After Substring Concatenation IIWatch
  578. 3505Minimum Operations to Make Elements Within K Subarrays EqualWatch
  579. 3509Maximum Product of Subsequences With an Alternating Sum Equal to KWatch
  580. 3519Count Numbers with Non-Decreasing Digits Watch
  581. 3524Find X Value of Array IWatch
  582. 3530Maximum Profit from Valid Topological Order in DAGWatch
  583. 3533Concatenated DivisibilityWatch
  584. 3534Path Existence Queries in a Graph IIWatch
  585. 3538Merge Operations for Minimum Travel TimeWatch
  586. 3539Find Sum of Array Product of Magical SequencesWatch
  587. 3543Maximum Weighted K-Edge PathWatch
  588. 3544Subtree Inversion SumWatch
  589. 3553Minimum Weighted Subgraph With the Required Paths IIWatch
  590. 3557Find Maximum Number of Non Intersecting SubstringsWatch
  591. 3559Number of Ways to Assign Edge Weights IIWatch
  592. 3562Maximum Profit from Trading Stocks with DiscountsWatch
  593. 3563Lexicographically Smallest String After Adjacent RemovalsWatch
  594. 3573Best Time to Buy and Sell Stock VWatch
  595. 3575Maximum Good Subtree ScoreWatch
  596. 3578Count Partitions With Max-Min Difference at Most KWatch
  597. 3579Minimum Steps to Convert String with OperationsWatch
  598. 3585Find Weighted Median Node in TreeWatch
  599. 3592Inverse Coin ChangeWatch
  600. 3593Minimum Increments to Equalize Leaf PathsWatch
  601. 3599Partition Array to Minimize XORWatch
  602. 3603Minimum Cost Path with Alternating Directions IIWatch
  603. 3610Minimum Number of Primes to Sum to TargetLocked
  604. 3615Longest Palindromic Path in GraphWatch
  605. 3620Network Recovery PathwaysWatch
  606. 3621Number of Integers With Popcount-Depth Equal to K IWatch
  607. 3628Maximum Number of Subsequences After One InsertingWatch
  608. 3638Maximum Balanced ShipmentsWatch
  609. 3640Trionic Array IIWatch
  610. 3647Maximum Weight in Two BagsLocked
  611. 3651Minimum Cost Path with TeleportationsWatch
  612. 3654Minimum Sum After Divisible Sum DeletionsWatch
  613. 3660Jump Game IXWatch
  614. 3661Maximum Walls Destroyed by RobotsWatch
  615. 3665Twisted Mirror Path CountWatch
  616. 3670Maximum Product of Two Integers With No Common BitsWatch
  617. 3685Subsequence Sum After Capping ElementsWatch
  618. 3686Number of Stable SubsequencesWatch
  619. 3693Climbing Stairs IIWatch
  620. 3699Number of ZigZag Arrays IWatch
  621. 3700Number of ZigZag Arrays IIWatch
  622. 3704Count No-Zero Pairs That Sum to NWatch
  623. 3717Minimum Operations to Make the Array BeautifulLocked
  624. 3725Count Ways to Choose Coprime Integers from RowsWatch
  625. 3738Longest Non-Decreasing Subarray After Replacing at Most One ElementWatch
  626. 3742Maximum Path Score in a GridWatch
  627. 3743Maximize Cyclic Partition ScoreWatch
  628. 3747Count Distinct Integers After Removing ZerosWatch
  629. 3751Total Waviness of Numbers in Range IWatch
  630. 3753Total Waviness of Numbers in Range IIWatch
  631. 3757Number of Effective SubsequencesWatch
  632. 3772Maximum Subgraph Score in a TreeWatch
  633. 3791Number of Balanced Integers in a RangeWatch
  634. 3797Count Routes to Climb a Rectangular GridWatch
  635. 3801Minimum Cost to Merge Sorted ListsWatch
  636. 3811Number of Alternating XOR PartitionsWatch
  637. 3826Minimum Partition ScoreWatch
  638. 3830Longest Alternating Subarray After Removing At Most One ElementWatch
  639. 3836Maximum Score Using Exactly K PairsWatch
  640. 3840House Robber VWatch
  641. 3844Longest Almost-Palindromic SubstringWatch
  642. 3850Count Sequences to KWatch
  643. 3857Minimum Cost to Split into OnesWatch
  644. 3869Count Fancy Numbers in a RangeWatch
  645. 3877Minimum Removals to Achieve Target XORWatch
  646. 3882Minimum XOR Path in a GridWatch
  647. 3883Count Non Decreasing Arrays With Given Digit SumsWatch
  648. 3891Minimum Increase to Maximize Special IndicesWatch
  649. 3892Minimum Operations to Achieve At Least K PeaksWatch
  650. 3906Count Good Integers on a Grid PathWatch
  651. 3915Maximum Sum of Alternating Subsequence With Distance at Least KWatch
  652. 3916Number of ZigZag Arrays IIILocked
  653. 3929Minimum Partition Score IILocked
  654. 3938Maximum Path Intersection Sum in a GridWatch
  655. 3939Count Non Adjacent Subsets in a Rooted TreeWatch
  656. 3946Maximum Number of Items From Sale IWatch
  657. 3949Subtree Inversion Sum IILocked
  658. 3952Maximum Total Value of Covered IndicesWatch
  659. 3954Sum of Compatible Numbers in Range IWatch
  660. 3956Maximum Sum of M Non-Overlapping Subarrays IWatch
  661. 3957Maximum Sum of M Non-Overlapping Subarrays IIWatch
  662. 3965Finish Time of Tasks IWatch
  663. 3966Count Good Integers in a RangeWatch
  664. 3967Finish Time of Tasks IILocked
  665. 3973Distinct Gate Paths to LCALocked
  666. 3976Maximum Subarray Sum After MultiplierWatch
  667. 3977Minimum Time to Reach Target With Limited PowerWatch
  668. 3980Minimum Operations to Transform Binary StringWatch
  669. 3981Count Distinct Ways to Form Target from Two StringsWatch
  670. 3984Divisible GameWatch
  671. 3989Maximum Consistent Columns in a GridWatch
  672. 3995Minimum Cost to Convert String IIIWatch
  673. 4009Minimum Possible Maximum Waiting TimeWatch
  674. 4016Maximum Area of Two Non-Overlapping Square SubmatricesWatch
  675. 4023Elevator Requests IIWatch
  676. 4027Elevator Requests IIIWatch
  677. 4040Minimum Operations to Form Subset Sum IWatch
  678. 4041Minimum Operations to Form Subset Sum IIWatch
  679. 4047Minimum Operations to Make XOR of All Elements ZeroLocked
  680. 4050Minimum Days to Score Exactly N PointsWatch