If you are using Python, you should use the standard 'random.shuffle' which does use the Fisher-Yates algorithm.
fisher-yates
How to use fisher-yates in a sentence. Live example sentences for fisher-yates pulled from indexed public discussions.
Editorial note
If you are using Python, you should use the standard 'random.shuffle' which does use the Fisher-Yates algorithm.
Quick take
If you are using Python, you should use the standard 'random.shuffle' which does use the Fisher-Yates algorithm.
Example sentences
Literally just take a list of songs, and Fisher-Yates shuffle the bugger; give the user exactly what the button claimed.
The Fisher-Yates method lets you get the same results without messing with the array length.
This is just a partial Fisher-Yates shuffle[1] using a sparse sequence instead of an array.
The salt for the email could be a CRC, or a Fisher-Yates, or any of a dozen other novel one-way transformations.
I learned of the Fisher-Yates shuffle as the Knuth shuffle, but apparently both names are used for it.
Did you even bother to learn how Fisher-Yates works before assuming you could come up with a simpler solution than the industry standard?
OP's Fisher-Yates is correct, the only mistake is the last superfluous iteration.
List::Util [1], part of Perl 5 standard library, offers shuffle function which implements Fisher-Yates [2].
Also, I really have to question your claim that this is even easier than Fisher-Yates.
So I came up with one which I later discovered was Fisher-Yates and optimal.
Fisher-Yates is the common suggestion on what to use.
Quote examples
I've seen in the piece of code corresponding to the Fisher-Yates algorithm this snippet: "n-- | 0".
Search for "javascript shuffle" to find a correct Fisher-Yates implementation.
Um, the "Knuth Shuffle" aka "Fisher-Yates"?
"Pick random co-ordinates, check, and retry?" The most efficient way (which is arguably unnecessary for Minesweeper) is to treat a 10x10 play field as a 1 dimensional array of size 100, stick your X number of mines in the first X cells in the array, then use something like the Fisher-Yates shuffle* on the array.
Frequently asked questions
Short answers drawn from the clearest meanings and examples for this word.
How do you use fisher-yates in a sentence?
If you are using Python, you should use the standard 'random.shuffle' which does use the Fisher-Yates algorithm.