Collections overview
The Kotlin standard library provides a comprehensive set of tools for working with collections. A collection is a group of items that relate to the problem you're solving and that you commonly process together. Collections usually contain elements of the same type or its subtypes. Objects in a collection are called elements or items.
The collection API is generic, so you can use the same functions and interfaces with built-in and user-defined types. The kotlin.collections package contains the collection interfaces and related functions.
Kotlin provides three main collection types:
List is an ordered collection. It supports indexed access and can contain duplicate elements. For example, you can use a list to store the digits of a telephone number.
Set is a collection of unique elements. It doesn't guarantee iteration order, but specific implementations can preserve insertion order or keep elements sorted. For example, you can use a set to store the numbers on lottery tickets.
Map (or dictionary) is a set of key-value pairs. Each key is unique and maps to one value. For example, you can use a map to associate employee IDs and their positions.
Kotlin also provides ArrayDeque. It's a double-ended queue that you can use as a queue or stack.
To learn about List, Set, and Map, read the corresponding sections or watch a video by Sebastian Aigner, Kotlin Developer Advocate:
Read-only and mutable collections
Each main collection type has a read-only interface, such as List, and a corresponding mutable interface, such as MutableList. Read-only interfaces provide operations for accessing elements, while mutable interfaces add operations for adding, removing, and updating them.
Prefer read-only interfaces when callers don't need to modify a collection. This makes your intent explicit in the API and prevents accidental modification through that interface. By contrast, an immutable collection doesn't allow you to change its elements after creation. For immutable and persistent implementations, use the kotlinx-collections-immutable library.
The interfaces form the following hierarchy:

Collection<T> is the common superinterface of List and Set. It provides operations like checking the size of a collection. Collection inherits from the Iterable<T> interface, which supports iteration over elements. Map doesn't extend Collection.
You can use Collection as a parameter of a function that applies to different collection types. For type-specific operations, use an interface that inherits from Collection, such as List or Set.