Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help right now please Question 6 1.5 pts public static int f5(int x, int y) { int z = 0; for (int i =

Need help right now please

image text in transcribedimage text in transcribedimage text in transcribed

Question 6 1.5 pts public static int f5(int x, int y) { int z = 0; for (int i = x; i > @; i /= 2) { if (i % 2 == 1) { z += y; } y *= 2; } return z; } O 0(1) Odlog N) O(N) O O(N log N) O O(N) Question 7 1.5 pts public static int f6(int x, int y) { int q = ; y = y = y) { q++; X -= y; } } return g; } O 0(1) O O(log N) O O(N) O O(N log N) O O(N) > Question 8 public static int f7(int x, int y) { int z = 0; while (x >= y) { Z++; X -= y; } return x; } O 0(1) O(log N) O(N) O O(N log N) O O(N)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

4th Edition

0615231047, 978-0615231044

More Books

Students also viewed these Databases questions