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
AI Thread 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.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...

Similar threads

Replies
6
Views
1K
Replies
7
Views
4K
Replies
10
Views
4K
Replies
6
Views
4K
Replies
11
Views
3K
Replies
59
Views
9K
Replies
5
Views
4K
Back
Top