Mars Interview Question

Technical interview was based on an example problem