Skip to content

Conversation

@iamanigeeit
Copy link

Strictly speaking
swap(first, second)

is not correct because it doesn't swap in the array.

In insertion sort we have
swap(array[index-1], array[index])

So i have updated the bubble sort pseudocode to do the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant