Jefferies interview question

General white-boarding problems with time and space complexity analysis.