Which of the following is not a similarity between a stack and a queue as described by the text?

a. both have an isEmpty method
b. both can retrieve an item from any position
c. both can insert an entry at one end of the structure
d. both can retrieve an entry from one end of the structure


b. both can retrieve an item from any position

Computer Science & Information Technology

You might also like to view...

The list processing instruction, ___________________, is used when you want all of the elements of a list to execute the same instruction(s) simultaneously.

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

Computer Science & Information Technology

The Number data type specifies that the variables will contain letters or numbers.

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

Computer Science & Information Technology

Which if statement would be true if you needed to see if the sum of x and y (both ints) was 12 or y (an int) was 0?

A. if ( (x + y) = 12 || y = 0 ) B. if ( x + y == 12 || y == 0 ) C. if ( (x + y) == 12 && y == 0 ) D. if ( x + y == 12 == 0 )

Computer Science & Information Technology

Steven is working on a database that stores student data. He needs to find students majoring in either one of two majors. He is looking for students majoring in Economics. He also is looking for students majoring in History. Which operator would Steven use to find this information?

A) OR B) AND C) NOT D) NULL

Computer Science & Information Technology