We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/spring1843/go-dsa/blame/adc15f7574794bfed14bc10c1689415323fa619c/array/bubble_sort.go#L7
the implementation is comparing the elements in a inefficient way
please see the comparison bellow
func bubbleSort(input []int) []int { swapped := true for swapped { swapped = false for i := 1; i < len(input); i++ { if input[i-1] > input[i] { input[i], input[i-1] = input[i-1], input[i] swapped = true } } } return input }
The text was updated successfully, but these errors were encountered:
@gledsoul thank you for finding this enhancement. Looks like a good change, would you like to open a PR to suggest this improvement?
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
https://github.com/spring1843/go-dsa/blame/adc15f7574794bfed14bc10c1689415323fa619c/array/bubble_sort.go#L7
the implementation is comparing the elements in a inefficient way
please see the comparison bellow
The text was updated successfully, but these errors were encountered: