teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

Fisher–Yates shuffle

2017/06/21 01:54

投稿

think49
think49

スコア18194

answer CHANGED
@@ -1,5 +1,10 @@
1
1
  ### 二次元配列
2
2
 
3
+ 配列のシャッフルには **Fisher–Yates shuffle** を使用しています。
4
+
5
+ - [フィッシャー - イェーツのシャッフル - Wikipedia](https://ja.wikipedia.org/wiki/%E3%83%95%E3%82%A3%E3%83%83%E3%82%B7%E3%83%A3%E3%83%BC_-_%E3%82%A4%E3%82%A7%E3%83%BC%E3%83%84%E3%81%AE%E3%82%B7%E3%83%A3%E3%83%83%E3%83%95%E3%83%AB)
6
+ - [Fisher–Yates shuffle - Wikipedia](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle)
7
+
3
8
  ```JavaScript
4
9
  function arrayShuffle (array) {
5
10
  var k, t, len;