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.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Thread 'Project Documentation'
Trying to package up a small bank account manager project that I have been tempering on for a while. One that is certainly worth something to me. Although I have created methods to whip up quick documents with all fields and properties. I would like something better to reference in order to express the mechanical functions. It is unclear to me about any standardized format for code documentation that exists. I have tried object orientated diagrams with shapes to try and express the...

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