Dropbox Interview Question

Debug this code for logic errors