equal
deleted
inserted
replaced
34 (all.indexOf(max) + 1, max) |
34 (all.indexOf(max) + 1, max) |
35 } |
35 } |
36 |
36 |
37 |
37 |
38 // some testing harness |
38 // some testing harness |
39 val bnds = List(10, 100, 1000, 10000, 100000, 1000000) |
39 val bnds = List(2, 10, 100, 1000, 10000, 100000, 77000, 90000, 1000000) |
40 |
40 |
41 for (bnd <- bnds) { |
41 for (bnd <- bnds) { |
42 val (max, steps) = collatz_max(bnd) |
42 val (max, steps) = collatz_max(bnd) |
43 println(s"In the range of 1 - ${bnd} the number ${max} needs the maximum steps of ${steps}") |
43 println(s"In the range of 1 - ${bnd} the number ${max} needs the maximum steps of ${steps}") |
44 } |
44 } |