Capchase interview question

Time complexity for each solution you provide