Island interview question

implement a dict in O(1).