Domanda di colloquio di Neebal Technologies

Asked to explain time complexity and space complexity of each code?