Trilogy interview question

Prefix Sum + Binary Search DSA Problem