Mars interview question

Technical interview was based on an example problem