C# 정렬 알고리즘 - 삽입정렬(Insertion sort)
삽입정렬(Insertion sort)이란? 삽입정렬(Insertion sort)은 앞의 숫자가 나보다 큰지 비교하면서 자신의 위치에 삽입하는 정렬 방법이다. 앞의 값과 비교를 하기 때문에 전체 배열 중 0번 인덱스가 아닌 1번 인덱스부터 앞의 값과 비교한다. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Insertion_sort { class Program { static void Main(string[] args) { Console.WriteLine("삽입정렬"); int[] nArrData = { 20, 15, 1, 5, ..