Goldman Sachs Interview Question

Binary Search+HashMap HashMap and dealing with overflow