What is the worst-case complexity of a binary search?

A. O(n2)
B. O(n)
C. O(log2n)
D. O2


Answer: C

Computer Science & Information Technology

You might also like to view...

A random number, created as an object of the Random class, is always a(n) __________.

a. object b. integer c. float d. class

Computer Science & Information Technology

The Graphics2D method(s) that determine(s) the color and texture for the shape to display is/are:

a. setStroke b. setPaint c. setTexture and setColor d. setTexturePaint

Computer Science & Information Technology

To ____________________ means to line up selected objects along their centers or edges.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

A declaration statement that specifically contains the word ____ is different from every other declaration statement in that it does not cause the creation of a new variable by reserving new storage for the variable.

A. auto B. static C. extern D. register

Computer Science & Information Technology