# The Progress Parade

> Just tell them how far along you are.

Canonical URL: <https://datadriven.io/problems/the_progress_parade>

Domain: Python · Difficulty: easy · Seniority: L3

## Problem

Given positive integer k, return the list [k*10//100, k*20//100, ..., k*100//100] (each 10% milestone of k as an integer using floor division). Always 10 elements.

## Worked solution and explanation

### Why this problem exists in real interviews

This tests **arithmetic milestone computation**, a simple but practical problem. It checks whether candidates can translate 'every 10%' into a concrete list of values based on a total count.

---

### Break down the requirements

#### Step 1: Compute the step size

10% of k gives the number of items between milestones.

#### Step 2: Generate milestones from 10% to 100%

Multiply the step size by 1, 2, ..., 10 to get the milestone counts, converted to percentages.

#### Step 3: Handle cases where k is less than 10

If `k // 10` is 0, no milestones are reachable at 10% intervals. Return what is computable.

---

### The solution

**Step-based milestone generation**

```python
def milestones(k):
    result = []
    step = k // 10
    if step == 0:
        return result
    for i in range(1, 11):
        pct = i * 10
        count = step * i
        if count <= k:
            result.append(pct)
    return result
```

> **Time and Space Complexity**
>
> **Time:** O(1). The loop runs at most 10 iterations.
> 
> **Space:** O(1). At most 10 milestone entries.

> **Interviewers Watch For**
>
> Do you use integer arithmetic consistently? Floating-point 10% of 7 is 0.7, which does not correspond to any item count. Integer division gives clean boundaries.

> **Common Pitfall**
>
> Including 100% when `10 * step` exceeds k due to integer truncation. For `k = 15`, `step = 1`, and `10 * 1 = 10 <= 15`, so 100% is valid. But for `k = 9`, `step = 0`, and no milestones are reachable.

---

## Common follow-up questions

- What if the interval were configurable (e.g., every 5%)? _(Tests parameterizing the step count.)_
- What if you needed the item indices rather than percentages? _(Tests returning `step * i` instead of `i * 10`.)_
- What if k could be zero? _(Tests handling the edge case where no work exists.)_

## Related

- [All practice problems](https://datadriven.io/problems)
- [Mock interview mode](https://datadriven.io/interview/the_progress_parade)
- [Python Interview Questions](https://datadriven.io/python-interview-questions)
- [Data Engineering Interview Prep Guide](https://datadriven.io/data-engineer-interview-prep)
- [Daily Challenge](https://datadriven.io/daily)

---

Source: DataDriven (https://datadriven.io). 100% free data engineering interview prep. Live code execution against Postgres 16, Python 3.11, and Spark sandboxes. No paywall, no premium tier, no signup gate.