Answer the following statements true (T) or false (F)

1. A binary search can only be used on a sorted array.
2. The tower function that solves the Towers of Hanoi problem has three parameters.
3. Iteration is usually more efficient than recursion.
4. If a path through a function is missing a return statement the compiler will not detect the error.
5. If error checking is done inside a recursive function it will perform more efficiently.


1. True
2. False
3. True
4. True
5. False

Computer Science & Information Technology

You might also like to view...

If you used the ONMOUSEMOVE event to capture mouse events over an image, which of the following event properties would you use to capture the location of the mouse cursor relative to the image boundaries?

(a) altkey (b) clientX / clientY (c) screenX / screenY (d) offsetX / offsetY

Computer Science & Information Technology

If you create a style rule for the p selector, it will style all the p elements in the Web page. The solution to this is to use CSS ____ selectors.

A. concatenated B. class C. elemental D. active

Computer Science & Information Technology

What is the best way to organize your files

A) Group them alphabetically B) Group them by file type C) Group them by how they relate to each other D) Group them by the date they were created

Computer Science & Information Technology

A ________, a second-level menu, displays an arrow to indicate that more options are available

A) shortcut menu B) taskbar C) jump list D) submenu

Computer Science & Information Technology