Amazon Interview Question

1. Binary search 2. Tiny URL