equal
deleted
inserted
replaced
5 //(1) Complete the collatz function below. It should |
5 //(1) Complete the collatz function below. It should |
6 // recursively calculate the number of steps needed |
6 // recursively calculate the number of steps needed |
7 // until the collatz series reaches the number 1. |
7 // until the collatz series reaches the number 1. |
8 // If needed you can use an auxilary function that |
8 // If needed you can use an auxilary function that |
9 // performs the recursion. The function should expect |
9 // performs the recursion. The function should expect |
10 // arguments in the range of 1 to 10 Million. |
10 // arguments in the range of 1 to 1 Million. |
11 |
11 |
12 def collatz(n: Long): ... = ... |
12 def collatz(n: Long): ... = ... |
13 |
13 |
14 |
14 |
15 //(2) Complete the collatz bound function below. It should |
15 //(2) Complete the collatz bound function below. It should |