less than 1 minute read

Tags: , , ,

就又想 要把馬步紮穩就這樣 又來看一些書了 XDD

Imgur

Add the Runtime: O(A + B)

for (int a : arrA ) {
   print(a);
}

for (int b: arrB) {
  print(b);
}

Multiply the Runtime: O(A * B)

for (int a : arrA ) {
  for (int b: arrB) {
  print(a + " , "+ b);
  }
}

Reference