Visa Inc. Interview Question

Write an algorithm for a problem that falls under prefix sum / cumulative sum computation and categorization based on thresholds.