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

General performance improvement: #6078

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

mosbat
Copy link
Contributor

@mosbat mosbat commented Nov 1, 2024

1- Replaced single element lists with java's singletonList to conserve memory.
2- Replaced empty lists with java's emptyList() to conserve memory.
3- Removed commented code.
4- Fixed classes without set package.
5- Replaced string concatenations with StringBuilders'.
6- Other minor improvements.

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

@codecov-commenter
Copy link

codecov-commenter commented Nov 1, 2024

Codecov Report

Attention: Patch coverage is 67.74194% with 10 lines in your changes missing coverage. Please review.

Project coverage is 73.46%. Comparing base (7b962a4) to head (486754a).

Files with missing lines Patch % Lines
...om/thealgorithms/conversions/AnyBaseToAnyBase.java 0.00% 4 Missing ⚠️
...thealgorithms/conversions/HexaDecimalToBinary.java 0.00% 4 Missing ⚠️
...orithms/datastructures/lists/SinglyLinkedList.java 0.00% 1 Missing ⚠️
...in/java/com/thealgorithms/maths/VampireNumber.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6078      +/-   ##
============================================
+ Coverage     73.44%   73.46%   +0.02%     
- Complexity     5082     5097      +15     
============================================
  Files           657      657              
  Lines         17632    17632              
  Branches       3396     3394       -2     
============================================
+ Hits          12949    12954       +5     
+ Misses         4181     4176       -5     
  Partials        502      502              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

1- Replaced single element lists with java's singletonList to conserve memory.
2- Replaced empty lists with java's emptyList() to conserve memory.
3- Removed commented code.
4- Fixed classes without set package.
5- Replaced string concatenations with StringBuilders'.
6- Other minor improvements.
Copy link
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@siriak siriak merged commit df0c997 into TheAlgorithms:master Nov 1, 2024
6 checks passed
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