Changed code style
This commit is contained in:
parent
014bfda4f9
commit
ecfd0f0d72
@ -62,7 +62,10 @@ public class IterativeTernarySearch implements SearchAlgorithm {
|
|||||||
Random r = new Random();
|
Random r = new Random();
|
||||||
int size = 100;
|
int size = 100;
|
||||||
int maxElement = 100000;
|
int maxElement = 100000;
|
||||||
Integer[] integers = Stream.generate(() -> r.nextInt(maxElement)).limit(size).sorted().toArray(Integer[]::new);
|
Integer[] integers = Stream.generate(() -> r.nextInt(maxElement))
|
||||||
|
.limit(size)
|
||||||
|
.sorted()
|
||||||
|
.toArray(Integer[]::new);
|
||||||
|
|
||||||
|
|
||||||
//the element that should be found
|
//the element that should be found
|
||||||
|
Loading…
Reference in New Issue
Block a user