Segment Tree Problems
57 Segment Tree LeetCode problems · Solve with AI-powered hints & step-by-step explanations.
Learn the coding interview patterns behind these problems.
All Segment Tree problems
218 The Skyline Problem Hard307 Range Sum Query - Mutable Medium315 Count of Smaller Numbers After Self Hard327 Count of Range Sum Hard406 Queue Reconstruction by Height Medium493 Reverse Pairs Hard673 Number of Longest Increasing Subsequence Medium699 Falling Squares Hard715 Range Module Hard729 My Calendar I Medium731 My Calendar II Medium732 My Calendar III Hard850 Rectangle Area II Hard1157 Online Majority Element In Subarray Hard1395 Count Number of Teams Medium1505 Minimum Possible Integer After at Most K Adjacent Swaps On Digits Hard1521 Find a Value of a Mysterious Function Closest to Target Hard1622 Fancy Sequence Hard1649 Create Sorted Array through Instructions Hard1687 Delivering Boxes from Storage to Ports Hard2080 Range Frequency Queries Medium2179 Count Good Triplets in an Array Hard2213 Longest Substring of One Repeating Character Hard2276 Count Integers in Intervals Hard2286 Booking Concert Tickets in Groups Hard2407 Longest Increasing Subsequence II Hard2424 Longest Uploaded Prefix Medium2426 Number of Pairs Satisfying Inequality Hard2569 Handling Sum Queries After Update Hard2659 Make Array Empty Hard2736 Maximum Sum Queries Hard2916 Subarrays Distinct Element Sum of Squares II Hard2926 Maximum Balanced Subsequence Sum Hard2940 Find Building Where Alice and Bob Can Meet Hard3072 Distribute Elements Into Two Arrays II Hard3117 Minimum Sum of Values by Dividing Array Hard3161 Block Placement Queries Hard3165 Maximum Sum of Subsequence With Non-adjacent Elements Hard3171 Find Subarray With Bitwise OR Closest to K Hard3187 Peaks in Array Hard3209 Number of Subarrays With AND Value of K Hard3291 Minimum Number of Valid Strings to Form Target I Medium3292 Minimum Number of Valid Strings to Form Target II Hard3380 Maximum Area Rectangle With Point Constraints I Medium3382 Maximum Area Rectangle With Point Constraints II Hard3410 Maximize Subarray Sum After Removing All Occurrences of One Element Hard3420 Count Non-Decreasing Subarrays After K Operations Hard3454 Separate Squares II Hard3477 Fruits Into Baskets II Easy3479 Fruits Into Baskets III Medium3480 Maximize Subarrays After Removing One Conflicting Pair Hard3501 Maximize Active Section with Trade II Hard3515 Shortest Path in a Weighted Tree Hard3525 Find X Value of Array II Hard3569 Maximize Count of Distinct Primes After Split Hard3605 Minimum Stability Factor of Array Hard3624 Number of Integers With Popcount-Depth Equal to K II Hard