Перейти к содержимому

How to Sort Lists with Tail Recursion in Scala | Rock the JVM

Rock the JVM

0:00 / 0:00

How to Sort Lists with Tail Recursion in Scala | Rock the JVM

6 888 просмотров · 5 лет назад
Rock the JVM
27,2 тыс. подписчиков
6 888 просмотров · 5 лет назад
Written version: https://blog.rockthejvm.com/sorting/ This video requires only basic experience with #Scala and I'm assuming beginner level, although more versed programmers will also get value out of the video (check the tips at the last 2 minutes). In this video I'll show you how to sort lists in Scala, which is probably one of the first problems you'll get when starting out (it's also quite a common interview question). We'll do it in a purely functional way with immutable list in Scala. Then I'll show you how the intuitive solution fails for large data structures and I'll walk you through how to approach it differently: with tail recursion. Follow Rock the JVM on: LinkedIn:   / rockthejvm   Twitter:   / rockthejvm   Blog: https://rockthejvm.com/blog ------------------------------------------------------------------------- Home: https://rockthejvm.com -------------------------------------------------------------------------