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.
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!
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.
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.
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!