eBay interview question

Easy-Medium level Data structures and algorithm questions for both rounds.