Solved #1 in scala
Solved #2 in scala
Solved #3 in scala
Solved #4 in scala
Uses list comprehentions instead of for loops