Front-end Developer • 1y
Fisher-Yates algorithm shuffles an array by iterating from the end, swapping each element with a randomly selected one preceding it. This ensures each element has an equal chance of ending up anywhere. Time complexity is O(n).
Download the medial app to read full posts, comements and news.