PracHub
QuestionsCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Zoox

Can a Car Meet a Truck?

Last updated: Jun 26, 2026

Quick Overview

This question evaluates a candidate's ability to reason about grid-based movement and time-indexed reachability, testing competencies in algorithmic analysis, discrete geometry, and distance metrics.

  • hard
  • Zoox
  • Coding & Algorithms
  • Software Engineer

Can a Car Meet a Truck?

Company: Zoox

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: hard

Interview Round: Onsite

A truck's position on a 2D grid is known at each second. You are given an array `positions` where `positions[i] = [x_i, y_i]` is the truck's location at time `i + 1`. Another car starts at `(0, 0)` at time `0`. Every second, it may move one unit up, down, left, right, or stay in place. Return whether the car can occupy the same grid cell as the truck at the same time at any point. Example: - `positions = [[1, 0], [2, 0], [2, 1]]` - The answer is `true`, because the car can reach `(1, 0)` at time `1`. You should describe an efficient solution and handle edge cases carefully.

Quick Answer: This question evaluates a candidate's ability to reason about grid-based movement and time-indexed reachability, testing competencies in algorithmic analysis, discrete geometry, and distance metrics.

Related Interview Questions

  • Lane-Change Safety and Longitudinal Motion Simulation - Zoox (medium)
  • Compute Roller Coaster Scores - Zoox (medium)
  • Write Transaction Analytics SQL Queries - Zoox (medium)
  • Write SQL revenue and anomaly queries - Zoox (medium)
  • Choose fastest way to transfer 2 TB - Zoox (easy)
|Home/Coding & Algorithms/Zoox

Can a Car Meet a Truck?

Zoox logo
Zoox
Dec 13, 2025, 12:00 AM
hardSoftware EngineerOnsiteCoding & Algorithms
5
0
Practice Read
Loading...

A truck's position on a 2D grid is known at each second.

You are given an array positions where positions[i] = [x_i, y_i] is the truck's location at time i + 1.

Another car starts at (0, 0) at time 0. Every second, it may move one unit up, down, left, right, or stay in place.

Return whether the car can occupy the same grid cell as the truck at the same time at any point.

Example:

  • positions = [[1, 0], [2, 0], [2, 1]]
  • The answer is true , because the car can reach (1, 0) at time 1 .

You should describe an efficient solution and handle edge cases carefully.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Zoox•More Software Engineer•Zoox Software Engineer•Zoox Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.