eBay interview question

String reverse and DB questions