Changed code style

This commit is contained in:
nik 2018-04-19 09:47:11 +03:00
parent 014bfda4f9
commit ecfd0f0d72

View File

@ -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