What is the Big Oh of method2 Is there a best case and a worst case public static void

Chapter 4, Problem 15

(choose chapter or problem)

What is the Big Oh of method2? Is there a best case and a worst case? public static void method2(int[] array, int n) { for (int index = 1; index <= n - 1; index++) privateMethod2(array[index], array, 0, index - 1); } // end method2 public static void privateMethod2(int entry, int[] array, int begin, int end) { int index; for (index = end; (index >= begin) && (entry < array[index]); index--) array[index + 1] = array[index]; array[index + 1] = entry; } // end privateMethod2

Unfortunately, we don't have that question answered yet. But you can get it answered in just 5 hours by Logging in or Becoming a subscriber.

Becoming a subscriber
Or look for another answer

×

Login

Login or Sign up for access to all of our study tools and educational content!

Forgot password?
Register Now

×

Register

Sign up for access to all content on our site!

Or login if you already have an account

×

Reset password

If you have an active account we’ll send you an e-mail for password recovery

Or login if you have your password back