Tag Archives: scala 99 problems

Scala 99 Problems on github

A long time ago I started playing with the scala 99 problems. The project is going very slow, but it is moving. So I decided to share the code in a more open and easier way: github. I have solutions … Continue reading

Posted in scala | Tagged , , , , , | Leave a comment

Scala Problem Number Six

From the Scala 99 Problems, lets face the problem number six: P06 (*) Find out whether a list is a palindrome. Example: scala> isPalindrome(List(1, 2, 3, 2, 1)) res0: Boolean = true The first thing I had to do was … Continue reading

Posted in scala | Tagged , , , , , , , | Leave a comment

Scala Problem Number Five

From the Scala 99 Problems, the problem number five goes like this: P05 (*) Reverse a list. Example: scala> reverse(List(1, 1, 2, 3, 5, 8)) res0: List[Int] = List(8, 5, 3, 2, 1, 1) Starting with the obvious solution, using … Continue reading

Posted in scala | Tagged , , , , , , | Leave a comment

Scala Problem Number Four

Lets solve now the problem number four, from the Scala 99 Problems. This one goes as follows: P04 (*) Find the number of elements of a list. Example: scala> length(List(1, 1, 2, 3, 5, 8)) res0: Int = 6 Lets … Continue reading

Posted in scala | Tagged , , , , , , | Leave a comment

Scala Problem Number Three

I almost forgot I started this ‘series’… Sorry! Now, with some time at hand, lets look at the problem number three, from the Scala 99 Problems. Like problem number one and two, this one is about list manipulations. It says: … Continue reading

Posted in scala | Tagged , , | Leave a comment