PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/OpenAI

Model particle hits on a screen

Last updated: Apr 11, 2026

Quick Overview

This question evaluates geometric reasoning and probability theory skills, specifically transformation of random variables and derivation of CDF/PDF from angular sampling, together with practical competence in Monte Carlo simulation and interpretation of numerical and visualization artifacts; domain: Software Engineering Fundamentals.

  • hard
  • OpenAI
  • Software Engineering Fundamentals
  • Software Engineer

Model particle hits on a screen

Company: OpenAI

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: hard

Interview Round: Onsite

A point source at (0, 0) emits particles toward an infinite vertical screen located at x = 1. For each particle, sample an angle theta uniformly from [-pi/2, pi/2] relative to the positive x-axis, and let the particle travel in a straight line until it hits the screen. 1. Let Y be the y-coordinate where the particle hits the screen. Express Y in terms of theta. 2. Derive the CDF and PDF of Y. 3. Write a simulation that generates many particles and verifies the theoretical result by comparing a normalized histogram of the sampled hit locations with the true density. 4. Briefly explain any numerical or visualization issues you would expect in this simulation.

Quick Answer: This question evaluates geometric reasoning and probability theory skills, specifically transformation of random variables and derivation of CDF/PDF from angular sampling, together with practical competence in Monte Carlo simulation and interpretation of numerical and visualization artifacts; domain: Software Engineering Fundamentals.

Related Interview Questions

  • Implement a Simple Memory Allocator - OpenAI (medium)
  • Implement an Extensible Chatbot App - OpenAI (medium)
  • Build a Reliable Streaming Chat UI - OpenAI (hard)
  • Design an Extensible Simulation Engine - OpenAI (hard)
  • Debug a Concurrent Job Scheduler - OpenAI (medium)
OpenAI logo
OpenAI
Feb 22, 2026, 12:00 AM
Software Engineer
Onsite
Software Engineering Fundamentals
38
0

A point source at (0, 0) emits particles toward an infinite vertical screen located at x = 1. For each particle, sample an angle theta uniformly from [-pi/2, pi/2] relative to the positive x-axis, and let the particle travel in a straight line until it hits the screen.

  1. Let Y be the y-coordinate where the particle hits the screen. Express Y in terms of theta.
  2. Derive the CDF and PDF of Y.
  3. Write a simulation that generates many particles and verifies the theoretical result by comparing a normalized histogram of the sampled hit locations with the true density.
  4. Briefly explain any numerical or visualization issues you would expect in this simulation.

Solution

Show

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More OpenAI•More Software Engineer•OpenAI Software Engineer•OpenAI Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals
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
  • Compare Platforms
  • Discord Community

Support

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

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.