The sequence class is further divided into two classes IndexedSeq and LinearSeq.
IndexSeq and LinearSeq do not add new operations to the Seq class, but each offers different performance characteristics. Collections of the LinearSeq class have efficient head and tail operations. What this means is that the collection is structured in such a way that it is not computationally difficult to access the head (first element) of the collection or the tail (last element) of the collection. Furthermore, IndexedSeq collections have efficient apply and length operations.
Before we move on to the actual collection, we will learn about the for each method in the next lesson.
Collections which are part of the Seq class, store elements at fixed index positions, with the index starting at 0. Each element has a specified location in the sequence and therefore, can be located very easily.