Question d’entretien chez Neebal Technologies

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