How many stars will these functions print if called as f(10)?
fun f(n: Int) {
if (n > 0) g(n - 1)
}
fun g(n: Int) {
print("*")
if (n > 1) f(n - 3)
}How many stars will these functions print if called as f(10)?
fun f(n: Int) {
if (n > 0) g(n - 1)
}
fun g(n: Int) {
print("*")
if (n > 1) f(n - 3)
}Create a free account to access the full topic