Amazon Interview Question

Coding was about graphs(leet code hard), and logical design