Some basic algorithms in scala. Just for training