This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
元の配列 | |
26, 400, 19, 504, 8, 500, 58, 14, 401, 168, 13 | |
処理中の様子 | |
key : 400 | |
配列の大きさは11、中身は : 26, 400, 19, 504, 8, 500, 58, 14, 401, 168, 13 | |
key : 19 | |
配列の大きさは11、中身は : 19, 26, 400, 504, 8, 500, 58, 14, 401, 168, 13 | |
key : 504 | |
配列の大きさは11、中身は : 19, 26, 400, 504, 8, 500, 58, 14, 401, 168, 13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
元の配列 | |
26, 400, 19, 504, 8, 500, 58, 14, 401, 168, 13 | |
処理中の様子 | |
インデックス1の 400 を確認します。 | |
配列の大きさは11、中身は : 400, 26, 19, 504, 8, 500, 58, 14, 401, 168, 13 | |
インデックス2の 19 を確認します。 | |
配列の大きさは11、中身は : 400, 26, 19, 504, 8, 500, 58, 14, 401, 168, 13 | |
インデックス3の 504 を確認します。 | |
配列の大きさは11、中身は : 504, 400, 19, 26, 8, 500, 58, 14, 401, 168, 13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
元の配列 | |
26, 400, 19, 504, 8, 500, 58, 14, 401, 168, 13 | |
処理中の様子 | |
UpHeapを実行します。 | |
インデックス1の 400 を確認します。 | |
配列の大きさは11、中身は : 400, 26, 19, 504, 8, 500, 58, 14, 401, 168, 13 | |
インデックス2の 19 を確認します。 | |
配列の大きさは11、中身は : 400, 26, 19, 504, 8, 500, 58, 14, 401, 168, 13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
/// <Summary> | |
/// ヒープソートを行うスクリプトです。 | |
/// </Summary> | |
public class HeapSort : SortBase { | |
// 処理回数を保持する変数です。 | |
int iterationNum = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
/// <Summary> | |
/// ヒープソートを行うスクリプトです。 | |
/// </Summary> | |
public class HeapSortPre : SortBase { | |
// 処理回数を保持する変数です。 | |
int iterationNum = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
/// <Summary> | |
/// 挿入ソートを行うスクリプトです。 | |
/// </Summary> | |
public class InsertionSort : SortBase { | |
void Start(){ | |
ExecuteSort(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
/// <Summary> | |
/// クイックソートを行うスクリプトです。 | |
/// </Summary> | |
public class QuickSort : SortBase { | |
// 処理回数を保持する変数です。 | |
int iterationNum = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
/// <Summary> | |
/// ノームソートを行うスクリプトです。 | |
/// </Summary> | |
public class GnomeSort : SortBase { | |
void Start(){ | |
ExecuteSort(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
/// <Summary> | |
/// コムソート(コームソート)を行うスクリプトです。 | |
/// </Summary> | |
public class CombSort : SortBase { | |
void Start(){ | |
ExecuteSort(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
/// <Summary> | |
/// バブルソートを改良した奇偶転置ソートを行うスクリプトです。 | |
/// </Summary> | |
public class OddEvenSort : SortBase { | |
void Start(){ | |
ExecuteSort(); | |
} |