-
Notifications
You must be signed in to change notification settings - Fork 19.6k
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
Improvements to Vampire Number #6110
base: master
Are you sure you want to change the base?
Conversation
- Remove unused code - Just print formatted lines instead of accumulating them in a StringBuilder - Rename the method to reflect what it does - Make pseudo vampire number choice an argument
- Fix a bug in check for pseudo vampire number - Make method that split into digits accept vararg and slightly simplify it
…er to the beginning
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6110 +/- ##
============================================
+ Coverage 73.64% 73.74% +0.10%
- Complexity 5112 5119 +7
============================================
Files 658 658
Lines 17649 17641 -8
Branches 3396 3394 -2
============================================
+ Hits 12997 13010 +13
+ Misses 4147 4127 -20
+ Partials 505 504 -1 ☔ View full report in Codecov by Sentry. |
IMHO, limiting tests to just 3 static imports and forbidding to static import org.junit.jupiter.api.Assertions.* is too strict and actually hurts readability. Not gonna argue, juest a thought. |
// methode to Split the numbers to Digits | ||
static String splitIntoDigits(int num, int num2) { | ||
StringBuilder res = new StringBuilder(); | ||
static void printVampireNumbers(int startValue, int stopValue, boolean ignorePseudoVampireNumbers) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove main and printVampireNumbers, we don't usually add visualization, only algorithms
Several improvements to maths/VampireNumber code:
clang-format -i --style=file path/to/your/file.java