Skip to content
LakeBench
ProblemsCommunityPricing
Sign inStart practicing

Running sum of daily signups

Python data engineering interview problem. Difficulty: beginner. Pattern: Aggregation. About 10 minutes. Part of the Pro drill bank.

Growth tracks daily new signups. Finance wants a running total so day 3's number is signups from day 1 through day 3, not that day alone.

Turn a list of daily signup counts into a prefix (running) sum.

Requirements

  • Each output index i is the sum of daily[0] through daily[i].
  • Preserve list length.

Constraints

  • daily: list of non-negative daily counts.

Examples

Input: running_sum([1, 2, 3]) Output: [1, 3, 6] This input follows the stated rules and produces this output.

Topics: lakebench, python, iteration.

More Python interview questions · All interview problems · Learn data engineering

beginner

Running sum of daily signups

Interview-style drill: Given a list of daily signup counts, return the running cumulative total.

Turn a list of daily signup counts into a prefix (running) sum.