Uber interview question

They asked a recursive function.