Space Complexity correction

Space Complexity correction from O(N) to O(1)