space complexity of an algorithm