Domanda di colloquio di Meta

2 leetcode tagged questions, and then answer time complexity analysis