Meta interview question

Two easy leetcode style questions