Given function F, what would it return if called as f(6)?
fun f(n: Int): Int = if (n > 2) f(n - 1) + f(n - 2) + f(n - 3) else n
Given function F, what would it return if called as f(6)?
fun f(n: Int): Int = if (n > 2) f(n - 1) + f(n - 2) + f(n - 3) else n
Create a free account to access the full topic