Closed MarkJeronimus closed 5 years ago
Oops I meant O(n^2)
That's what it says on page 15: "It’s quite easy to show that the singing time is Θ(n^2); in particular, the singer mentions the name of a gift n(n + 1)/2 times (counting the partridge in the pear tree)." But the number of gifts is Θ(n^3).
The running time should probably be Θ(2), not Θ(3)