Question d’entretien chez Intuit

I was asked time and space complexity on my first coding challenge solution