Object Modeling Problems
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.
- A Premium questionCoding · Medium
- A Premium questionCoding · Medium
- 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.
SpaceX interview guideKnow what SpaceX asks before you walk in.
20 coding · 1 system design · 15 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.