O(n)space complexity