Horace Mann interview question

Space and time complexity Programming basics