Realization of algorithms on Scala from http://e-maxx.ru/algo/.