---
title: "Comment by Favourite Jome on \"Introduction to Algorithm Part 2: Bubble Sort and Selection Sort.\" | Hashnode"
description: "Hi Michelle Buchi Okonicha Thanks for sharing! Though I noticed you made a mistake in the Bubble sort example, which propagated through the example snippet. Fro"
url: "https://hashnode.com/posts/introduction-to-algorithm-part-2-bubble-sort-and-selection-sort/645896a0579d30826289e536/comment/64593ef149a8ff3f1d35f12c"
---

[Discussion](https://hashnode.com/posts/introduction-to-algorithm-part-2-bubble-sort-and-selection-sort/645896a0579d30826289e536)

Comment [Introduction to Algorithm Part 2: Bubble Sort and Selection Sort.](https://hashnode.com/posts/introduction-to-algorithm-part-2-bubble-sort-and-selection-sort/645896a0579d30826289e536)

[Favourite Jome](https://hashnode.com/@Favourite)

[May 8, 2023](https://hashnode.com/posts/introduction-to-algorithm-part-2-bubble-sort-and-selection-sort/645896a0579d30826289e536/comment/64593ef149a8ff3f1d35f12c)

Hi [Michelle Buchi Okonicha](https://hashnode.com/@Michelle-Buchi) Thanks for sharing!

Though I noticed you made a mistake in the Bubble sort example, which propagated through the example snippet.

From the image below, you had \[4,5,1,8, 9,7,2\] and the next items to be swapped are \[9, 7\] and not \[8, 7\] which you used.

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1683570070346/017f459f-2848-44a6-bc39-20800d57bc59.png)

I'm sure you understand the concepts of these algorithms, but I'd say do more research so you can explain them better, especially with the swapCounter variable, at some point, I go lost in your explanation about it.

I'm no expert on this topic, but I just wanted to put that out, Happy writing!

[Michelle Buchi Okonicha](https://hashnode.com/@Michelle-Buchi)

[May 9, 2023](https://hashnode.com/posts/introduction-to-algorithm-part-2-bubble-sort-and-selection-sort/645896a0579d30826289e536/comment/64593ef149a8ff3f1d35f12c#reply-645a39534c568a455ef02139)

Thank you for pointing this out. It will be corrected. Thanks.

[Favourite Jome](https://hashnode.com/@Favourite)

[May 9, 2023](https://hashnode.com/posts/introduction-to-algorithm-part-2-bubble-sort-and-selection-sort/645896a0579d30826289e536/comment/64593ef149a8ff3f1d35f12c#reply-645a3a199197834c2edbe936)

You're welcome [Michelle Buchi Okonicha](https://hashnode.com/@Michelle-Buchi)
