Apple interview question

They were all easy/medium leetcode