Skip to content

Commit 1dae91f

Browse files
authored
Update About IS Algorithm
1 parent aa95d3a commit 1dae91f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Insertion Sort/About IS Algorithm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
- Insertion sort is a simple sorting algorithm that works similarly to the way you sort playing cards in your hands. The array is virtually split into a sorted and an unsorted part. Values from the unsorted part are picked and placed in the correct position in the sorted part.
2+
- To sort an array of size N in ascending order iterate over the array and compare the current element (key) to its predecessor, if the key element is smaller than its predecessor, compare it to the elements before. Move the greater elements one position up to make space for the swapped element.
3+
14

0 commit comments

Comments
 (0)