Visa Inc. interview question

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