Amazon Interview Question: write a function to determine... | Glassdoor