style: format code (#4212)

close #4204
This commit is contained in:
acbin
2023-06-09 18:52:05 +08:00
committed by GitHub
parent ad03086f54
commit 00282efd8b
521 changed files with 5233 additions and 7309 deletions

View File

@ -59,22 +59,14 @@ public class FibonacciSearch implements SearchAlgorithm {
// Driver Program
public static void main(String[] args) {
Integer[] integers = { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512 };
Integer[] integers = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512};
int size = integers.length;
Integer shouldBeFound = 128;
FibonacciSearch fsearch = new FibonacciSearch();
int atIndex = fsearch.find(integers, shouldBeFound);
System.out.println(
"Should be found: " +
shouldBeFound +
". Found " +
integers[atIndex] +
" at index " +
atIndex +
". An array length " +
size
);
System.out.println("Should be found: " + shouldBeFound + ". Found " + integers[atIndex]
+ " at index " + atIndex + ". An array length " + size);
}
}