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
- Hierarchy, read-only versus mutable, and implementations
- List, Set, Map, and transformation foundations
- Access, search, filtering, safe absence, and runtime type filtering
- List-specific indexes, views, binary search, pairing, and mutation
- Map-specific lookup, transformation, insertion, and removal
- Set algebra, membership differences, and equality stability
- Sorting, comparators, aggregation, and domain folds
- Advanced and running aggregation
- Grouping, association, duplicate keys, and map lookup
- Mutation, references, aliases, shallow copying, and ownership
- Destination operations and collection builders
- Collection operators mental map
- Advanced collection operations through practical scenarios
- Sequence execution order and performance
- 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