Skip to content
LEETFLIX

method

Divide and Conquer — animated LeetCode walkthroughs

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

71 problems · 62 animated · 9 locked

Full D&C index

  1. 4Median of Two Sorted ArraysWatch
  2. 23Merge k Sorted ListsWatch
  3. 53Maximum SubarrayWatch
  4. 105Construct Binary Tree from Preorder and Inorder TraversalWatch
  5. 106Construct Binary Tree from Inorder and Postorder TraversalWatch
  6. 108Convert Sorted Array to Binary Search TreeWatch
  7. 109Convert Sorted List to Binary Search TreeWatch
  8. 148Sort ListWatch
  9. 169Majority ElementWatch
  10. 190Reverse BitsWatch
  11. 191Number of 1 BitsWatch
  12. 215Kth Largest Element in an ArrayWatch
  13. 218The Skyline ProblemWatch
  14. 240Search a 2D Matrix IIWatch
  15. 307Range Sum Query - MutableWatch
  16. 315Count of Smaller Numbers After SelfWatch
  17. 324Wiggle Sort IIWatch
  18. 327Count of Range SumWatch
  19. 347Top K Frequent ElementsWatch
  20. 372Super PowWatch
  21. 395Longest Substring with At Least K Repeating CharactersWatch
  22. 427Construct Quad TreeWatch
  23. 493Reverse PairsWatch
  24. 558Logical OR of Two Binary Grids Represented as Quad-TreesWatch
  25. 654Maximum Binary TreeWatch
  26. 761Special Binary StringWatch
  27. 889Construct Binary Tree from Preorder and Postorder TraversalWatch
  28. 912Sort an ArrayWatch
  29. 918Maximum Sum Circular SubarrayWatch
  30. 932Beautiful ArrayWatch
  31. 973K Closest Points to OriginWatch
  32. 1274Number of Ships in a RectangleLocked
  33. 1382Balance a Binary Search TreeWatch
  34. 1569Number of Ways to Reorder Array to Get Same BSTWatch
  35. 1649Create Sorted Array through InstructionsWatch
  36. 1738Find Kth Largest XOR Coordinate ValueWatch
  37. 1756Design Most Recently Used QueueLocked
  38. 1763Longest Nice SubstringWatch
  39. 1985Find the Kth Largest Integer in the ArrayWatch
  40. 2031Count Subarrays With More Ones Than ZerosLocked
  41. 2179Count Good Triplets in an ArrayWatch
  42. 2343Query Kth Smallest Trimmed NumberWatch
  43. 2407Longest Increasing Subsequence IIWatch
  44. 2426Number of Pairs Satisfying InequalityWatch
  45. 2519Count the Number of K-Big IndicesLocked
  46. 2613Beautiful PairsLocked
  47. 2792Count Nodes That Are Great EnoughLocked
  48. 3109Find the Index of PermutationLocked
  49. 3165Maximum Sum of Subsequence With Non-adjacent ElementsWatch
  50. 3410Maximize Subarray Sum After Removing All Occurrences of One ElementWatch
  51. 3520Minimum Threshold for Inversion Pairs CountLocked
  52. 3537Fill a Special GridWatch
  53. 3624Number of Integers With Popcount-Depth Equal to K IIWatch
  54. 3636Threshold Majority QueriesWatch
  55. 3653XOR After Range Multiplication Queries IWatch
  56. 3655XOR After Range Multiplication Queries IIWatch
  57. 3719Longest Balanced Subarray IWatch
  58. 3721Longest Balanced Subarray IIWatch
  59. 3737Count Subarrays With Majority Element IWatch
  60. 3739Count Subarrays With Majority Element IIWatch
  61. 3749Evaluate Valid ExpressionsLocked
  62. 3759Count Elements With at Least K Greater ValuesWatch
  63. 3826Minimum Partition ScoreWatch
  64. 3841Palindromic Path Queries in a TreeWatch
  65. 3855Sum of K-Digit Numbers in a RangeWatch
  66. 3864Minimum Cost to Partition a Binary StringWatch
  67. 3943Number of Pairs After IncrementWatch
  68. 4011Count Subarrays With Even Odd Ratio IWatch
  69. 4013Count Subarrays With Even Odd Ratio IIWatch
  70. 4017Peaks in Array IIWatch
  71. 4055Count Shadow Pairs IIWatch