Amazon interview question

It was on leetcode and system design