Upstart interview question

brainteaser, prob, and algorithm related questions