/dsa

Data Structures and Algorithms in Kotlin. Test-driven development

Primary LanguageKotlin

DSA

https://github.com/raywenderlich/dsk-materials

Kotlin collection interfaces

Tier 1, Iterable:

An iterable type provides sequential access to its elements via an Iterator.

Tier 2, Collection:

A collection is an iterable that provides additional functionality, allowing you to check if the collection contains a particular element or a collection of elements.

Tier 3, MutableIterable:

An iterable that provides a MutableIterator, which allows both accessing the items and removing them.

Tier 4, MutableCollection:

A collection that also provides methods to alter its contained items. For example, you can add and remove elements, and even clear the entire collection.