Triangle O(n) space