You are viewing a single comment's thread. Return to all comments →
Scala. They need to fix the question for this language.
object Solution extends App { import scala.io.StdIn.readInt def f(num:Int) : List[Int] = { if (num == 0) Nil else num::f(num-1) } println(f(readInt)) }
Seems like cookies are disabled on this browser, please enable them to open this website
Array Of N Elements
You are viewing a single comment's thread. Return to all comments →
Scala. They need to fix the question for this language.