Amazon Interview Question

Can’t say. But it was a Leetcode Hard, a famous one.