Sky interview question

Easy/medium leetcode, one tested performance