Here is a part of an algorithm to rotate an array by 180 degrees.
System.out.println("\nHasil:");
for (i= arr.length-1; i>=0; i--) {
System.out.print("[");
for (j= arr.length-1; j>=0; j--){
System.out.print(arr[i][j]);
if (j != 0) {
System.out.print(",");
}
}System.out.println("]");
}
I'm confused how to determine the big o notation that have nested loop with if statement inside it.