MHB Selection Sort & Insertion Sort: Step-by-Step Guide to Sorting Data

  • Thread starter Thread starter Henry R
  • Start date Start date
  • Tags Tags
    Algorithm Sorting
Click For Summary
The discussion focuses on sorting the data set 22, 85, 43, 28, 65, 35 using selection sort and insertion sort algorithms. Participants confirm familiarity with these algorithms from class, mentioning quick sort and simple selection sort as well. The importance of understanding these sorting methods through step-by-step analysis is emphasized, with suggestions to refer to Wikipedia for visual aids like GIFs that illustrate the processes. It is recommended to use pseudocode and manually work through the sorting steps on paper for better comprehension, especially given the small size of the data set.
Henry R
Messages
25
Reaction score
0
How to do this?

Show the step by step how the following data is sorted into ascending order using the given sorting algorithm :

22 85 43 28 65 35

i) Selection sort.
ii) Insertion Sort.
 
Technology news on Phys.org
Henry R said:
How to do this?

Show the step by step how the following data is sorted into ascending order using the given sorting algorithm :

22 85 43 28 65 35

i) Selection sort.
ii) Insertion Sort.

Have you seen these algorithms in class?
 
evinda said:
Have you seen these algorithms in class?

yes. It's about sorting.

- - - Updated - - -

evinda said:
Have you seen these algorithms in class?

Yeah. They talk about quick sort, simple selection sort and something like that.
 
Henry R said:
How to do this?

Show the step by step how the following data is sorted into ascending order using the given sorting algorithm :

22 85 43 28 65 35

i) Selection sort.
ii) Insertion Sort.

The Wikipedia pages on these two sorting methods not only have text examples, but also .gifs to illustrate how they work.

Best way to analyse these algorithms step by step is to obtain the pseudocode and then work through it step by step using a pen and paper. Your list only contains 6 elements so it won't take long to do it manually. You'll also gain a much better understanding of the algorithms this way.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 59 ·
2
Replies
59
Views
9K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 5 ·
Replies
5
Views
1K