Amazon interview question

1 Leetcode medium question about data structures, 1 Leetcode hard question about matrices