What will be the time complexity?
`
for(int i=0;i<n;i++){
for(int j=i;j<i*i;j++){
for(int k=0;k<j;k++){
System.out.println("*")
}
}
}
`
What will be the time complexity?
`
for(int i=0;i<n;i++){
for(int j=i;j<i*i;j++){
for(int k=0;k<j;k++){
System.out.println("*")
}
}
}
`
**
***
***
****
*****
******
*******
********
****
*****
******
*******
********
*********
**********
***********
************
*************
**************
***************
when n = 5, which leads me to believe it is O n^4:
For i = 0 to n ->n
For j = i to i*i ->max times is n sqr
For k = 0 to j ->n
I may be wrong, I'm not yet an expert at big O, but thanks for reading :)