This is a series continuation of Introduction to Algorithm: Linear Search versus binary search. Where we also discussed sorted and unsorted searches. You have to go through the first material before jumping on this as it is a continuation and you can...

Markdown supported · ⌘↵ to post
Favourite Jome
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!