Collection Types in Swift

Gunjan Agrawal
Dec 26, 2020

There are three types of collections in swift

  1. Array
  2. Dictionary
  3. 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

--

--