generated from eigerco/beerus
-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: bubble sort in decreasing order (#223)
## Pull Request type Please check the type of change your PR introduces: - [ ] Bugfix - [X] 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 - [X] 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
- Loading branch information
1 parent
1de9e5f
commit 3cb40ac
Showing
2 changed files
with
89 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters