Chapter 5. Enhancing the Performance of Collections
A collection is an object that groups multiple elements into a single unit and provides an interface to perform various operations, such as sorting, insertion, searching, and deletion. The Java Collection Framework (JCF) provides a set of interfaces and implementations that cover the most common data structures. The standard Kotlin library extends the JCF to provide many methods for manipulations, such as map
, filter
, and reduce
. Moreover, in Kotlin, collections are categorized as mutable or immutable.
In this chapter, we'll cover the following topics:
- Data structures
- Time complexity
- Collections in Kotlin
- Sequences in Kotlin