| changeset 140 | aac534649b27 | 
| parent 127 | 01d522ba48d4 | 
| 139:30540237c439 | 140:aac534649b27 | 
|---|---|
14 val max = all.max  | 
14 val max = all.max  | 
15 (max, all.indexOf(max) + 1)  | 
15 (max, all.indexOf(max) + 1)  | 
16 }  | 
16 }  | 
17  | 
17  | 
18  | 
18  | 
19 // some testing harness...5 Mio pushes the envelope  | 
|
20  | 
|
21 val bnds = List(2, 10, 100, 1000, 10000, 100000,  | 
|
22 77000, 90000, 1000000, 5000000)  | 
|
23  | 
|
24 for (bnd <- bnds) {  | 
|
25 val (steps, max) = collatz_max(bnd)  | 
|
26 println(s"In the range of 1 - ${bnd} the number ${max} needs the maximum steps of ${steps}")  | 
|
27 }  | 
19 }  | 
28  | 
20  | 
29  | 
|
30 }  | 
|
31  |