Remi-Leblond/S99 — comment on commit 5476124d708c40b1574dbf0b4322103a86979b91
File: src/S1.scala line 19
By LannyRipple:

.length on a list is an O(n) operation. Fine for small lists but in loops and things can rapidly turn into O(n^2) behavior. Consider the number of operations in

```scala
def countAll[A](xs: List[A]): Int = {
@annotation.tailrec
def count(ys: List[A], z: Int): Int = ys match {
case Nil => z
case _ :: ts => count(ts, ys.length)
}
count(xs, 0)
}
```

With an IndexedSeq (which promises an efficient apply() and length()) that would be O(n). With List (which can only promise to be a Seq) it's O(n^2).