Once you attempt the question then PrepInsta explanation will be displayed.

**Space complexity** is a measure of the amount of working storage an algorithm needs. That means how much memory, in the worst case, is needed at any point in the algorithm. As with time **complexity**, we're mostly concerned with how the space needs grow, in big-Oh terms, as the size N of the input problem grows.

Login/Signup to comment