I'm learning how to find t(n) function in java, but this is very confusing and I need help. For example:
for (int k=3; k<n; k++) {
for (int i=2; i<10; i++) {
for (int j=n/2; j<n; j++) {
int a = k*i*j;
System.out.println(a);
}
}
}
Would the T(n) function be: T(n) = 3(4(n+1) +n)+3(3(not sure)+n)+ 4()+1
With
3(4(n+1) +n)
3= 3 steps for this line of code
4= representing k=3
N+1= representing k
+n= representing k++
and then:
3(3(not sure what goes here for i<10)+n)
firs 3= 3 steps
next 3= representing i=2
+n= representing i++
How does this work exactly?
and what would be the notation for the remaining lines?