Pergunta de entrevista da empresa SpaceX

Fairly open ended question with implementation in C++.