MCPcopy Create free account
hub / github.com/CodeToExpress/dailycodebase / fisherYates

Function fisherYates

day19/JavaScript/fisherYates.js:13–32  ·  view source on GitHub ↗

* Fisher Yates Shuffle Algorithm * Implemented in JavaScript by @MadhavBahl * Algorithm * Step 1: Write down the numbers from 1 through N. * Step 2: Pick a random number k between one and the number of unstruck numbers remaining (inclusive). * Step 3: Counting from the low end, strike out

(arr)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

fisherYates.jsFile · 0.85

Calls 1

shuffleFunction · 0.85

Tested by

no test coverage detected