Pregunta de entrevista de Neebal Technologies

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