fix mistake in the heapsort() method and add MaxPriorityQueue.java
Describe your change:
Fixes https://github.com/TheAlgorithms/Java/issues/3515
- Fix a bug in the algorithm heapsort() in the MinPriorityQueue.java of com.thealgorithms.datastructures.heaps package. heapsort() method gave an error when size < capacity. Also add MaxPriorityQueue.
References
Checklist:
- [x] I have read CONTRIBUTING.md.
- [x] This pull request is all my own work -- I have not plagiarized.
- [x] I know that pull requests will not be merged if they fail the automated tests.
- [ ] This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
- [x] All new Java files are placed inside an existing directory.
- [x] All filenames are in all uppercase characters with no spaces or dashes.
- [x] All functions and variable names follow Java naming conventions.
- [x] All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
- [x] If this pull request resolves one or more open issues then the commit message contains
Fixes: #{$ISSUE_NO}.
Please replace
main()s with JUnit tests
OK
I think there are many files that don't have any dedicated test files, rather just a main() inside the class.
there may be some contributors who can write some test cases for those files. should I make some issues about creating test files
@debasishbsws that'd be nice!
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Please reopen this pull request once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to seek help from our Gitter or ping one of the reviewers. Thank you for your contributions!