Space time complexity

I am not able to understand this topic

Hey @guptakeshav885
which part of the algorithm do you have doubt in ?