eBay interview question

Design scenarios with pseudo code.