DataDriven
LearnPracticeInterviewDiscussDailyJobs

The Narrow Lens

A medium Python mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.

Domain
Python
Difficulty
medium
Seniority
L5

Interview Prompt

You are smoothing a stream of raw sensor readings before it feeds an alerting pipeline, replacing each reading with a trailing average that damps momentary spikes. Given the readings `values` and a `window_size`, return a list of the same length where each element is the average of the readings up to and including that position, looking back at most `window_size` readings. Near the start, before `window_size` readings exist, average only the ones seen so far.

Summary

A narrow timeframe. Everything inside matters.

How This Interview Works

  1. Read the vague prompt (just like a real interview)
  2. Ask clarifying questions to the AI interviewer
  3. Write your python solution with real code execution
  4. Get instant feedback and a hire/no-hire decision

Related

  • All Mock Interviews
  • Practice Mode (untimed)
  • Python Interview Questions
  • Data Engineering Interview Prep Guide
  • Practice Problems
  • Daily Challenge