complexity of algorithms
- by davit-datuashvili
i have question what is complexity of this algorithm
public class smax{
public static void main(String[]args){
int b[]=new int[11];
int a[]=new int[]{4,9,2,6,8,7,5};
for (int i=0;i
int m=0;
while (m
int k=a[0];
for (int i=0;i k && b[a[i]]!=1){
b[a[i]]=1;
}
}
m++;
}
for (int i=0;i
for (int j=0;j
//result=2 4 5 6 7 8 9
}
}
?