Pay attention to entire problem; avoid assuming


#1

The amount of space used for both int variables is not dependent on both for-loops created. As a result, there is no need to be adding the space complexities

You are adding the time complexities because the for-loops are not nested.

I made the original mistake of adding the space complexities.