Segment Tree : 🚩 First do this : Build Segment Tree for Range Sum Query Questions Problem Name Sum of Query II Range Sum Query - Mutable Range Minimum Query Lazy Propagation Range Update Range Maximum Index Query Find Building Where Alice and Bob Can Meet - (Leetcode - 2940) Count Good Triplets in an Array. - (Leetcode - 2179) Fruits Into Baskets II and III (Leetcode - 3477 and 3479) Longest Balanced Subarray II (Leetcode - 3721) Block Placement Queries (Leetcode - 3161) Maximize Active Section with Trade II (Leetcode - 3501) Longest Substring of One Repeating Character (Leetcode - 2213) Distribute Elements Into Two Arrays II (Leetcode - 3072)