Question bank › Prefix Sum
Dsa Prefix Sum Warm-up

Daily Step Count

A fitness app tracks user's step count daily over a week. For each day, you want to find the total steps taken by the user by the end of that day. Input: - A single line containing 7 integers representing the daily step counts. Output: - A single line containing 7 integers, where each integer is the total steps taken by the end of that day. Example: Input: 5000 3000 7000 2000 4000 1000 6000 Output: 5000 8000 15000 17000 21000 22000 28000

Key concepts

prefix_sumarray_processing

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.