YITU Technology interview question

Leetcode easy & median problems.