SLB interview question

Basic Time and Space complexities questions