Question: I want to work out the Time Complexity (eg T(n) = 7Cn 3 +1) of the following code in terms of number of operation: for
I want to work out the Time Complexity (eg T(n) = 7Cn3+1) of the following code in terms of number of operation:
for ( int i = 0; i < n; i += 5 ) {
for ( int j = 1; j < n; j *= 3 ) {
for ( int k = 1; k < n; k *= n ) {
// constant number C of operations
}
}
}
Need to show working as well
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
