A sequence is an abstract collection:
non-unique means that it allows duplicate member (the same element/value may occur more than once).
| Order matter for equivalence | Duplicate is allowed | Collection Type |
|---|---|---|
| false | false | set |
| false | true | Bag |
| true | false | OrderedSet |
| true | true | Sequence |
The position of an element in a sequence is its rank or index.
Collection - Cardinality (Size/Length) - In computer science
A finite sequence is called a list
A infinite sequence is called a stream and is generally read through a iterator pattern.
It's a data structures with no or slow random access.