First Republic interview question

Closures, Scope, Promises etc. Algorithmic Problems