Level: Senior-Level
Round: Onsite · Type: Coding · Difficulty: 7/10 · Duration: 60 min · Interviewer: Neutral
Topics: Simulation, Probability Distribution, Sampling, Physics
Location: San Francisco Bay Area
Interview date: 2026-01-15
The onsite interview involved simulating a physical system with a point light source emitting particles toward an infinite vertical screen.
I was asked to model and simulate a physical system where a point light source emits particles towards an infinite vertical screen. A key aspect was sampling the scattering angle uniformly between -π/2 and π/2 to ensure particles reach all parts of the screen. The resulting impact positions follow a Cauchy distribution, which I needed to verify by comparing a histogram of my samples to the theoretical probability density function (PDF).