Skip to main content

Kotlin Collections: from first list to production ownership

Simple idea

Collections store and transform groups of values. Mastery also requires understanding absence, duplicate keys, ordering, mutation, aliases, copying, allocation, and ownership—not merely memorizing operator names.

Chapter pages​

  1. Hierarchy, read-only versus mutable, and implementations
  2. List, Set, Map, and transformation foundations
  3. Access, search, filtering, safe absence, and runtime type filtering
  4. List-specific indexes, views, binary search, pairing, and mutation
  5. Map-specific lookup, transformation, insertion, and removal
  6. Set algebra, membership differences, and equality stability
  7. Sorting, comparators, aggregation, and domain folds
  8. Advanced and running aggregation
  9. Grouping, association, duplicate keys, and map lookup
  10. Mutation, references, aliases, shallow copying, and ownership
  11. Destination operations and collection builders
  12. Collection operators mental map
  13. Advanced collection operations through practical scenarios
  14. Sequence execution order and performance
  15. Android scenarios and interview exercises

Generics and variance now live under Kotlin type system. Extensions, delegates, and DSLs live under Advanced Kotlin, so the navigation does not imply that they are collection concepts.

How to learn each page​

Use the same cycle repeatedly:

Understand the simple idea
-> predict the code output
-> run it
-> explain what happened internally
-> change an input or edge case
-> answer the interview question
-> connect it to Android ownership and performance