1
$\begingroup$

enter image description here

I want to know from this picture which one is bubble sort, insertion sort and selection sort?

My answer is:

  1. bubble sort algorithm,
  2. insertion sort algorithm,
  3. selection sort algorithm.

Is it this right? Is there reference link too to picture which one is the right sort?

$\endgroup$
  • $\begingroup$ This site is not (supposed to be) a homework answering service.Can you ask a more specific question? $\endgroup$ – reinierpost Jan 17 at 9:10
2
$\begingroup$

In my opinion you get it right.

First row: in the second picture, we can see that the lower part are sorted and almost every element has been moved, which we can assume that is a bubble algorithm that moves the lower values to bottom.

Second row: we can observe that along the four pictures the algorithm is starting to sort the left part of the data. This indicate that the algorithm is exploring the data from left to right and insert each explored element in right position on the explored data (insertion sort).

Third row: from the second picture, the algorithm is searching for the lowest value and sort it ( selection sort)

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ @Nicekiller231 thankyou but what makes you said it is right? $\endgroup$ – devss Jan 13 at 16:55
  • $\begingroup$ First row: in the second picture, we can see that the upper and the lower part are sort it, which we can assume that is a double bubble algorithm that moves the low values to bottom and the high values to the top. Second row: we can observe that along the four pictures the algorithm is starting to sort the lower part of the data. This indicate that the algorthem is exploring the data and insert each explored element in right position on the explored data (insertion sort). Third row: from the second picture, the algorithm is serching for the lowest value and sort it ( selection sort) $\endgroup$ – Nicekiller231 Jan 13 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.