InterviewLegend

Object Modeling Problems

Alex Chen45 min readUpdated 20 real interview reports

A SpaceX live round sometimes opens with "design a program" and a sketch of something from the factory. You write a class and one algorithm inside it, and the time is short. One candidate got fifteen minutes for theirs.

Three problems below follow that pattern, each a small class with one algorithm inside. The classes count as much as the algorithm, and the easiest of the set came from a Python developer screen.

Start with the object model and talk it through. Name the fields, then say what every method returns on bad input, like an operation on an item that was never added. Keep the classes small and the names plain, since someone is reading over your shoulder. Likely follow-ups add one rule, so leave room for that in your design.

SpaceXPremium lesson · Coding round

The 3 SpaceX problems are below.

  1. A Premium questionCoding · Medium
  2. A Premium questionCoding · Medium
  3. A Premium questionCoding · Easy

Each with hints, the follow-up and a tested solution.

Get the SpaceX questions

$49 a year · all 100 companies · cancel anytime

From 20,000+ candidate reports, forum threads behind logins and write-ups in Chinese.

Had your SpaceX interview?Tell us what they asked. Reviewed before it goes in, never with your name.
SpaceX interview guide

Know what SpaceX asks before you walk in.

20 coding · 1 system design · 15 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.