Coding Interview challenge for Uber