Flag Ride Comfort Windows Where Jerk Exceeds a Limit

Last updated: November 29, 2026

Quick Overview

Given timestamped longitudinal acceleration samples from a robotaxi ride, find the merged time windows where the jerk between consecutive samples exceeds a comfort limit in absolute value.

Zoox
Coding & Algorithms
Software Engineer
Zoox
November 29, 2026
Software Engineer
Technical Screen
Coding & Algorithms
Easy

0

0

0 solved


Given timestamped longitudinal acceleration samples from a robotaxi ride, find the merged time windows where the jerk between consecutive samples exceeds a comfort limit in absolute value.

Zoox riders sit face to face with no steering wheel, so ride comfort metrics such as jerk are tracked closely for planner and controls changes. The question checks that a candidate can turn a physical definition into correct, simple code and merge adjacent intervals cleanly.

What the Interviewer Expects
  • Defines jerk as the finite difference of acceleration over time
  • Skips or reports duplicate and out-of-order timestamps instead of dividing by zero
  • Merges windows that share an endpoint into one interval
  • Runs in a single pass with O(n) time
  • Discusses noise and why raw finite differences may need filtering
Key Topics to Cover
finite differences
interval merging
ride comfort metrics
log processing
How to Approach This
  1. Clarify input constraints and edge cases before writing code.
  2. Walk through your approach verbally and confirm with the interviewer before coding.
  3. Start with a brute force solution, then optimize. Mention time and space complexity.
  4. Test your solution with examples, including edge cases like empty input or duplicates.
  5. Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
  • How would you smooth the signal before differencing, and what does that cost in latency?
  • How would you report the peak jerk inside each window?
  • What if you also need lateral jerk from yaw rate and speed?
  • How would you run this over millions of ride logs?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice DSA Problems
Sample Answer
Requirements

Input: list of (t, accel) tuples sorted by t (seconds, m/s^2), and a jerk limit in m/s^3. Output: list of [start, end] windows where |(a2 - a1) / (t2 - t1)| > limit, with back-to-back violatin...

High-Level Design

Walk consecutive pairs. Each pair is a segment [t1, t2] with one jerk value. If the segment violates the limit, either extend the last window (when it ends exactly at t1) or open a new one....


Submit Your Answer
Markdown supported

Related Questions