What is the function of the peek method in a stack implementation?

A. to return the bottom item without removing it
B. to return the top item without removing it
C. to return the top item and remove it from the stack
D. to return the bottom item and remove it from the stack


Answer: B

Computer Science & Information Technology

You might also like to view...

Two digital cellular standards used in the United States are

a. AMPS and CDMA b. CDMA and TDMA c. ETACS and AMPS d. ETACS and GSM

Computer Science & Information Technology

The ____ data type is a text string similar to the NMTOKEN data type, except that names must begin with a letter or the character ":" or "-".

A. xs:token B. xs:ENTITY C. xs:Name D. xs:NCName

Computer Science & Information Technology

To select an entire paragraph in a document, double-click on the paragraph you want to select

Indicate whether the statement is true or false

Computer Science & Information Technology

Designers previously relied on tables to create entire page layouts, but due to their lack of flexibility and limitations for access by people with disabilities, this use is now discouraged in favor of using ____-based layouts.

A. Java B. HTML C. JavaScript D. CSS

Computer Science & Information Technology