Collection Types in Swift
Dec 26, 2020
There are three types of collections in swift
- Array
- Dictionary
- Set
Array
The array is an ordered collection type. we can access the element by the index
Dictionary
Dictionary is an unordered collection.
It’s a key-value data type. We can access the value by using the unique key.
Set
Set is also an unordered collection type. and it works on hashing