IBM Interview Question

Prefix Sum - leetcode medium