Loading...
Engaged employer
Scala function to find the last element of a list using tail recursion
Anonymous
def last(l: List[Int]): Int = if (l.tail == Nil) l.head else method(l.tail)
Check out your Company Bowl for anonymous work chats.
Get actionable career advice tailored to you by joining more bowls.
Stay ahead in opportunities and insider tips by following your dream companies.
Get personalised job recommendations and updates by starting your searches.