You are viewing a single comment's thread. Return to all comments →
Scala solution
def f(arr:List[Int]):List[Int] = (for (i <- arr.size-1 to 0 by -1) yield arr(i)).toList
Reverse a List
You are viewing a single comment's thread. Return to all comments →
Scala solution