Space complexity is constant


#1

SC is O(1) as the variables do not depend on N