Bird
Raised Fist0
Software Engineeringknowledge~5 mins

Story points and velocity in Agile in Software Engineering - Time & Space Complexity

Choose your learning style10 modes available
Time Complexity: Story points and velocity in Agile
O(n)
Understanding Time Complexity

When using story points and velocity in Agile, it's helpful to understand how the effort to complete work grows as the amount of work increases.

We want to see how the total time or effort changes when the number of story points changes.

Scenario Under Consideration

Analyze the time complexity of calculating velocity from completed story points over sprints.


int calculateVelocity(int[] completedPoints, int sprintCount) {
  int total = 0;
  for (int i = 0; i < sprintCount; i++) {
    total += completedPoints[i];
  }
  return total / sprintCount;
}
    

This code sums story points completed in each sprint and calculates average velocity.

Identify Repeating Operations

Identify the loops, recursion, array traversals that repeat.

  • Primary operation: Loop through the array of completed story points.
  • How many times: Once for each sprint counted (sprintCount times).
How Execution Grows With Input

As the number of sprints increases, the number of additions grows linearly.

Input Size (sprintCount)Approx. Operations
1010 additions
100100 additions
10001000 additions

Pattern observation: The work grows directly with the number of sprints.

Final Time Complexity

Time Complexity: O(n)

This means the time to calculate velocity grows in a straight line as the number of sprints increases.

Common Mistake

[X] Wrong: "Calculating velocity is instant and does not depend on the number of sprints."

[OK] Correct: The calculation must look at each sprint's points, so more sprints mean more work.

Interview Connect

Understanding how effort scales with work size helps you explain Agile metrics clearly and shows you grasp practical software planning.

Self-Check

"What if we stored a running total of completed points instead of summing each time? How would that change the time complexity?"

Practice

(1/5)
1. What do story points represent in Agile project management?
easy
A. The deadline for completing a project
B. The exact number of hours needed to finish a task
C. A relative measure of effort required to complete a task
D. The total number of tasks in a sprint

Solution

  1. Step 1: Understand story points concept

    Story points are used to estimate how much effort a task will take compared to other tasks, not exact hours.
  2. Step 2: Differentiate from time estimates

    Unlike hours, story points are relative and help teams compare tasks easily.
  3. Final Answer:

    A relative measure of effort required to complete a task -> Option C
  4. Quick Check:

    Story points = relative effort [OK]
Hint: Story points measure effort, not exact time [OK]
Common Mistakes:
  • Confusing story points with hours
  • Thinking story points count tasks
  • Mixing story points with deadlines
2. Which of the following best defines velocity in Agile?
easy
A. The total story points completed in a sprint
B. The time taken to complete a single task
C. The number of team members working on a sprint
D. The number of meetings held during a sprint

Solution

  1. Step 1: Identify velocity meaning

    Velocity is the sum of story points completed by the team in one sprint.
  2. Step 2: Exclude unrelated options

    Team size, task time, and meetings do not define velocity.
  3. Final Answer:

    The total story points completed in a sprint -> Option A
  4. Quick Check:

    Velocity = completed story points [OK]
Hint: Velocity sums completed story points per sprint [OK]
Common Mistakes:
  • Confusing velocity with team size
  • Thinking velocity is task duration
  • Mixing velocity with number of meetings
3. A team completed tasks with story points: 3, 5, 2, and 8 in a sprint. What is their velocity?
medium
A. 20
B. 18
C. 10
D. 8

Solution

  1. Step 1: Add all completed story points

    Sum = 3 + 5 + 2 + 8 = 18
  2. Step 2: Confirm velocity definition

    Velocity is total story points done in sprint, so 18 is correct.
  3. Final Answer:

    18 -> Option B
  4. Quick Check:

    3+5+2+8 = 18 [OK]
Hint: Add all completed story points for velocity [OK]
Common Mistakes:
  • Adding incorrectly
  • Choosing highest single story point
  • Confusing velocity with number of tasks
4. A team planned 30 story points for a sprint but completed only 22. What is the velocity and what does it indicate?
medium
A. Velocity is 22; team completed less than planned
B. Velocity is 30; team met the plan
C. Velocity is 52; sum of planned and completed
D. Velocity is 8; difference between planned and completed

Solution

  1. Step 1: Identify velocity from completed points

    Velocity equals story points actually completed, which is 22.
  2. Step 2: Interpret velocity vs plan

    Since 22 is less than planned 30, team completed fewer points than expected.
  3. Final Answer:

    Velocity is 22; team completed less than planned -> Option A
  4. Quick Check:

    Velocity = completed points = 22 [OK]
Hint: Velocity = completed points, not planned [OK]
Common Mistakes:
  • Using planned points as velocity
  • Adding planned and completed points
  • Using difference as velocity
5. If a team's average velocity is 25 story points per sprint, how many sprints will they need to complete a backlog of 120 story points?
hard
A. 3
B. 4
C. 6
D. 5

Solution

  1. Step 1: Calculate number of sprints needed

    Divide total backlog points by average velocity: 120 รท 25 = 4.8 sprints.
  2. Step 2: Round up to whole sprints

    Since partial sprints are not practical, round up to 5 sprints.
  3. Final Answer:

    5 -> Option D
  4. Quick Check:

    120/25 โ‰ˆ 5 sprints [OK]
Hint: Divide backlog by velocity, round up [OK]
Common Mistakes:
  • Rounding down instead of up
  • Using velocity as planned points
  • Ignoring partial sprint calculation
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard