Meta interview question

2 leetcode tagged questions, and then answer time complexity analysis