Time Complexity of Loop with Powers- Analysis of Algorithm What is the time complexity of below function?Time complexity of above function can be written as

What is the Time Complexity of Loop with Powers with below function?

Time complexity of above function can be written as 1^{k} + 2^{k} + 3^{k} + … n1^{k}.

Let us try few examples:

In general, asymptotic value can be written as **(n ^{k+1})/(k+1) + Θ(n^{k})**

Note that, in asymptotic notations like **Θ** we can always ignore lower order terms. So the time complexity is **Θ(n ^{k+1} / (k+1))**

## Add Comment