Tenor interview question

Take home coding challenge.