Count of Range Sum
Hard
Arrays
Merge Sort
BIT
Solve Count of Range Sum.
Input/Output: as specified in examples.
Constraints
Optimized solution required.
Examples
Example 1:
Input: sample
Output:
Example 2:
Input: test
Output:
Hints
Consider a merge sort based approach.
Tests:
Runtime:
Memory:
Test
Input:
Expected:
Got:
Click Run Code to test against sample cases, or Submit to test against all cases.
▲ Console