Turing Interview Question

Coding Test: Frog and Fly distance Problem