Can you use the random_shuffle generic algorithm with a list container? What about a vector container? Why or why not?

What will be an ideal response?

The random_shuffle algorithm requires random access iterators. The list doesn’t have them but the vector does. So random_shuffle does not work with the list container but does with the vector.

Computer Science & Information Technology

You might also like to view...

When Excel opens, a new blank ________ is displayed

A) presentation B) database C) document D) workbook

Computer Science & Information Technology

The use of IntelliSense is the standard within the software industry.

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

Computer Science & Information Technology