Please help me finding the complexity of following code:
public static int method(int[] array, int n) {
for (i = 1; i < n; i++)
for (j = 1; j <= i; j++)
if (array[j] < array[j+1])
for (k = 1; k <= n; k++)
array[k] = array[k] * 2;
}
I need to know how BIG-O is calculated in best and worst case taking this code as an example