You are viewing a single comment's thread. Return to all comments →
Scala solution
def f(arr:List[Int]):List[Int] = (
for(i<- arr.length-1 to 0 by -1 ) yield arr(i)
).toList
Seems like cookies are disabled on this browser, please enable them to open this website
Reverse a List
You are viewing a single comment's thread. Return to all comments →
Scala solution
def f(arr:List[Int]):List[Int] = (
).toList