Google Interview Question

island binary three problem leetcode medium