From Algorithm Wiki
Revision as of 23:38, 1 February 2015 by Brownslink
For the answer given in part 2, the space required seems to be the sum from 1 to n of n which is n(n+1)/2. This gives O(n**2) for space requirements. Doesn't it?