Amazon interview question

Questions resembling leetcode problems (medium to hard).