Amazon interview question

How to handle conflict. Leetcode-style question about binary search and hashmap