Which of the following problems is most suitable to be solved using recursion?

A. binary search
B. initializing an array with zeros (0)
C. displaying a text menu to the user
D. randomly shuffling a deck of cards


Answer: A

Computer Science & Information Technology

You might also like to view...

What is a library file? Where are the C language libraries located in LINUX and UNIX? Give examples of three C libraries.

What will be an ideal response?

Computer Science & Information Technology

What is the time complexity of the following program?

int N = 0, M = 10; for (int x = 0; x <= M; x++ ) { writeToDisk(""something""); for (int y = 0; y <= N; y++ ) { Math.random(); } } a. O(M*N) b. O(N) c. O(N^2) d. O(M+N)

Computer Science & Information Technology

Common examples of vector graphics are images created in all of the following EXCEPT ____.

A. Microsoft Paint B. Adobe Flash C. Adobe Illustrator D. none of the above

Computer Science & Information Technology

When the result of a calculated field is too large to fit in a column, a series of pound signs # is displayed

Indicate whether the statement is true or false

Computer Science & Information Technology