Skip to content
New issue

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

Feat: bubble sort in decreasing order #223

Conversation

azurwastaken
Copy link
Contributor

Pull Request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build-related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

The bubble sort function only allow to sort an array in ascending order. this feature allow to sort in decreasing order.

Issue Number: N/A

What is the new behavior?

  • added a new boolean to select mode of sorting
  • if the boolean is set to false, the array is sorted in decreasing order
  • if the boolean is set to true, the array is sorted in ascending order

Does this introduce a breaking change?

  • Yes
  • Maybe
  • No

as the prototype of the function change, its possible that application that used the old version will need to update their code by adding the boolean.

Other information

I was wondering about creating two distinct function to avoid breaking change but i wasn't confortable to have two almost similar function. feel free to give me feedback

@0xLucqs 0xLucqs merged commit 3cb40ac into keep-starknet-strange:main Dec 8, 2023
3 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants