Exercise 7.2.1
Use the substitution method to prove that the recurrence T(n)=T(n−1)+Θ(n) has the solution T(n)=Θ(n2), as claimed at the beginning
of section 7.2
We represent Θ(n) as c2n and we guess that T(n)≤c1n2
T(n)=T(n−1)+c2n≤c1(n−1)2+c2n=c1n2−2c1n+c1+c2n≤c1n2(2c1>c2,n≥c1/(2c1−c2))