Amazon Interview Question

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