eBay interview question

Just write the code without communication.