AS
Aarav Sharma

Slide the window — reuse the sum

Sliding Window · submitted 2h ago

PASSED
Attempts
2
Time
14 min
Tutor turns
6
Communication
70/100

Tutor conversation

4 turns
  • What changes as the window slides one step right?

    10:22
  • One element leaves on the left, one enters on the right.

    10:23
  • Exactly. So what's the cheapest update?

    10:23
  • Subtract leaving, add entering. O(1) per step.

    10:24
AI assessment of the conversation

moved quickly through the workflow, recovered well from early misses.

Character rubric

Soft-skill signals inferred from the conversation pattern, attempts and pace.

  • Grit68
  • Curiosity69
  • Initiative66
  • Speed75
  • Resilience70
  • Communication76

Academic rubric · this submission

  • Problem decomposition82
  • Algorithmic thinking78
  • Code quality85
  • Debugging discipline72
  • Communication with tutor70

Code submission

def max_window_sum(nums, k):
    if k > len(nums): return 0
    window = sum(nums[:k])
    best = window
    for i in range(k, len(nums)):
        window += nums[i] - nums[i - k]
        best = max(best, window)
    return best