Shuffle algorithms

In this chapter, we learned how to sort an array to organize all its elements and also how to search elements after the array is sorted. But there are also scenarios where we need to shuffle the values of an array. A common scenario in real life is shuffling a deck of cards.

In the next section, we will learn about the most famous algorithm used to shuffle arrays.

Get Learning JavaScript Data Structures and Algorithms - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.