0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

image.png
1:整列アルゴリズム
 「代表的な整列アルゴリズム」
①交換法(アルゴリズム):手順の概要は隣同士を比較して、順序関係が逆であれば、入れ替える処理を繰り返す。
時間計算量:O(n2)
②選択法(アルゴリズム):手順の概要は最大値(最小値)を順次取り出す。時間計算量:O(n2)
③挿入法(アルゴリズム):手順の概要は整列済み要素の適切な位置に、未整列要素を挿入する処理を繰り返す。
時間計算量:O(n2):
④クイックソート(アルゴリズム):手順の概要は基準値よも大きなグループと、小さなグループに分ける。その後、各グループごとに、同様の処理を繰り返し適用する。時間計算量:O(nlog n)
⑤マージソート(アルゴリズム):手順の概要は整列済みの2つの配列を併合することを繰り返す。整列するデータの1/2を一時的に格納するための作業用領域が必要である。時間計算量:O(log n)

※試験の出題例:「対象集合から基準となる要素を選び、これよりも大きい要素の集合と小さい要素の集合に分割する。この操作を繰り返すことで、整列を行う。」方法はクイックソートである。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?