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

  • Context: MHB 
  • Thread starter Thread starter Henry R
  • Start date Start date
  • Tags Tags
    Algorithm Sorting
Click For Summary

Discussion Overview

The discussion revolves around the step-by-step sorting of a specific dataset using Selection Sort and Insertion Sort algorithms. Participants seek clarification on how to apply these algorithms to sort the numbers 22, 85, 43, 28, 65, and 35 in ascending order.

Discussion Character

  • Homework-related
  • Technical explanation

Main Points Raised

  • Several participants request a detailed, step-by-step demonstration of sorting the given data using Selection Sort and Insertion Sort.
  • One participant mentions having encountered these algorithms in class and connects them to broader sorting topics like quick sort.
  • Another participant suggests that reviewing Wikipedia pages for these algorithms could provide helpful visual aids, including text examples and .gifs.
  • A later reply recommends obtaining pseudocode for the algorithms and manually working through the sorting process to enhance understanding.

Areas of Agreement / Disagreement

Participants generally agree on the need for a step-by-step guide for the sorting algorithms, but there is no consensus on the best method to achieve this or on the specific details of the algorithms.

Contextual Notes

Some participants express uncertainty about their familiarity with the algorithms, and there is a suggestion that the discussion may benefit from additional resources or examples.

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
10K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 5 ·
Replies
5
Views
1K