eBay Interview Question

How can you improve this piece of code?