About the Recursive - Solution Set 3 category


Solutions to problem set 3

View the lesson here.


The explanation to Question 2 / Solution Set3 is confusing (me). It ends with the sentence: “the series … sums up to n(n+1)/2 which is again O(n).” This by itself is wrong. I assume that idea was to explain that the cost of each invocation of ‘permutate’ is O(n). I would add that the cost of the whole computation of permutate(array, 0) is still O(n!).