Uber interview question

Tree and hash map programme