Uber interview question

Search through binary tree and shorten a URL.