Presentation is loading. Please wait.

Presentation is loading. Please wait.

Insertion Sorting example { 48}

Similar presentations


Presentation on theme: "Insertion Sorting example { 48}"— Presentation transcript:

1 Insertion Sorting example { 48}62 35 77 55 14 35 98
{ 48 62} { } { } { } { }35 98 { }98 { }

2 Selection Sorting [49 38 65 97 76 13 27 49] 13 [38 65 97 76 49 27 49]
13 27 [ ] [ ] [ ] [ ] [97 76] [97]

3 Quick Sorting Interchange the elements pointed to by low and high We will choose a pivot element and partition the array into two parts. low high low high low high low high low high ( ) 49 ( ) low/high

4 Shell Sorting example Assume the increments are: 5,3,1
Initial case: 49,38,65,97,76,13,27,49,55,04 After sorting using increment 5:

5 Shell Sorting After sorting using increment 3:
04,13,38,27,49,49,55,65,76,97

6 Bottom-Up Merge Sorting
example

7 Radix Sorting Example: 36,5,16,98,95,47,32,36,48
After first distribution After first collection:32,5,95,36,16,36,47,98,48

8 Radix Sorting After second distribution:
After second collection:5,16,32,36,36,47,48,95,98


Download ppt "Insertion Sorting example { 48}"

Similar presentations


Ads by Google