mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-12-19 07:00:35 +08:00
style: enable NeedBraces in checkstyle (#5227)
* enable style NeedBraces * style: enable NeedBraces in checkstyle --------- Co-authored-by: Samuel Facchinello <samuel.facchinello@piksel.com>
This commit is contained in:
committed by
GitHub
parent
51fcc66345
commit
87b17e0571
@@ -15,8 +15,12 @@ public final class Tribonacci {
|
||||
* @return the n-th Tribonacci number
|
||||
*/
|
||||
public static int compute(int n) {
|
||||
if (n == 0) return 0;
|
||||
if (n == 1 || n == 2) return 1;
|
||||
if (n == 0) {
|
||||
return 0;
|
||||
}
|
||||
if (n == 1 || n == 2) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int first = 0;
|
||||
int second = 1;
|
||||
|
||||
Reference in New Issue
Block a user