Axon interview question

Straightforward algorithm implementation, will not mention specific details due to NDA.