AO
AceOffer
·
Back

Debug Coding (numpy/tensor/distributed)

CodingPhone, OnsiteSoftware Engineer, Machine Learning EngineerLast reported June 2026Low Frequency

Problem Overview

The interviewer provides pre-written buggy code involving numpy arrays, tensor operations, and distributed computing concepts.
What you must implement
  1. Matrix.zeros aliasing issues
  2. incorrect or missing axis parameter handling in to_ndarray (e.g., missing axis=1) and from_ndarray usage
  3. remainder truncation errors in distributed/tensor operations.
Full problem statement
The interviewer provides pre-written buggy code involving numpy arrays, tensor operations, and distributed computing concepts. The candidate must read and understand the code, identify the bugs, and rewrite the problematic sections. Known bug categories observed include: (1) Matrix.zeros aliasing issues, (2) incorrect or missing axis parameter handling in to_ndarray (e.g., missing axis=1) and from_ndarray usage, and (3) remainder truncation errors in distributed/tensor operations.

Follow-up Arc

Interviewers escalate through these phases. The order varies, but most candidates see at least one from each bucket.
Trade-off discussion · 3
Trade-off discussion
Why does this aliasing occur and how would you fix it?
Probes for: After candidate identifies aliasing bug with Matrix.zeros
What is the effect of omitting axis=1 here, and what is the correct behavior?
Probes for: After candidate identifies missing axis parameter in to_ndarray
How would you handle the case where the total workload does not evenly divide across workers?
Probes for: After candidate identifies remainder truncation in distributed logic

Approach Trade-offs

Approaches actually attempted in reports — including ones that lost candidates time. Pick deliberately.
ApproachNotes
Test-case driven debuggingRunning mental (or written) test cases against the buggy code can help surface incorrect outputs, but may be slow in an interview setting and may miss subtle aliasing or truncation bugs without careful edge-case selection.

Practice

Open the editor to write a solution against test cases, then return here to compare against the follow-ups.
Open Editor →
Waymo · Coding · Reported 2× across candidate reports