Turo Interview Question

Two relatively simple algorithm questions