Uber Interview Question

They asked a recursive function.