Types Of Sort Flashcards

1
Q

Algorithms use to sort an array

A

Bubble sort
Insertion sort
Quick sort

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Insertion Sort

A

Works in similar way you sort playing cards in your hands

Array is virtually split into into a sorted and unsorted part.

Values from unsorted part are picked and placed at correct position in sorted part

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Bubble sort

A

Easiest method

Compare each number in list with number next to it & swaps them if required.

The pass through the list is repeated until no more swaps are needed and list is sorted.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly