mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-23 20:44:39 +08:00
Simplifying boolean returns (#3796)
* Simplifying boolean returns * add comment back
This commit is contained in:
@ -33,10 +33,6 @@ public class DudeneyNumber {
|
||||
}
|
||||
|
||||
//If the cube root of the number is not equal to the sum of its digits we return false.
|
||||
if (cube_root != sum_of_digits) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return cube_root == sum_of_digits;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user