Domanda di colloquio di eBay

One binary search question and follow up by testing the code you write.