Shuffle algorithm is very useful in many programs. The algorightm can reorder the elements in a set randomly. It is used in the field of network, data processing, etc.
The algorithm is very simple. We have N elements in the Array and we want to rerange the elements again in a random order.
The code is as follows: