SLB Interview Question

Complexities - time and space complexity