Scala - Collections
Collections may be strict or lazy. Lazy collections have elements that may not consume memory until they are accessed, like Ranges.
mutable collections work better, and for others, immutable collections work better.HERE,
|Sr.No||Collections with Description|
Scala's List[A] is a linked list of type A.
A set is a collection of pairwise different elements of the same type.
A Map is a collection of key/value pairs. Any value can be retrieved based on its key.
Unlike an array or list, a tuple can hold objects with different types.
Option[A] provides a container for zero or one element of a given type.
An iterator is not a collection, but rather a way to access the elements of a collection one by one.