Duolingo Interview Question

Analyze time complexity of a function