Skip to content

Refactored three functions in order to reduce Cyclomatic complexity #164

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

Closed
wants to merge 4 commits into from

Conversation

akerfel
Copy link

@akerfel akerfel commented Feb 25, 2022

Refactored the following three functions in order to reduce Cyclomatic complexity.

  • BinarySearchTree.replaceNodeWithNode
  • RedBlackTree.BalanceAfterDelete
  • BinaryHeapArray.heapDown

All of these functions can be found in the folder src/com/jwetherell/algorithms/data_structures

We have mainly created helper functions for the above mentioned functions, making them shorter and more readable.

  • I have read the Contribution guidelines and I am confident that my PR reflects them.
  • I have followed the coding guidelines for this project.
  • My code follows the skeleton code structure.
  • This pull request has a descriptive title. For example, Added {Algorithm/DS name} [{Language}], not Update README.md or Added new code.

@akerfel akerfel closed this Mar 1, 2022
@akerfel akerfel deleted the refactoring branch March 1, 2022 23:16
@akerfel akerfel restored the refactoring branch March 1, 2022 23:16
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.

3 participants