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...

All of the following are unwanted software a hacker could install on your computer, EXCEPT ________

A) keystroke loggers B) ghosts C) Trojan horses D) rootkits

Computer Science & Information Technology

When inserting a graphic, you need not worry about splitting up a paragraph as Word's default setting automatically places the graphic you insert one line below the end of the closest paragraph

Indicate whether the statement is true or false

Computer Science & Information Technology