Sling Academy
Home/Kotlin/Kotlin Collections

Kotlin Collections

This series of tutorials helps you learn about arrays, lists, sets, and maps in Kotlin.

1 Introduction to Collections in Kotlin

2 Kotlin Immutable vs Mutable Collections: Key Differences

3 Choosing the Right Collection Type in Kotlin

4 Converting Between Arrays, Lists, Sets, and Maps in Kotlin

5 Sorting Collections in Kotlin: Built-in Methods

6 Transforming Collections with `map`, `flatMap`, and `mapNotNull` in Kotlin

7 Using Sequences for Lazy Evaluation in Kotlin

8 How to Get the Size or Length of a Collection in Kotlin

9 Checking if a Collection is Empty in Kotlin

10 Creating Arrays in Kotlin: Basics and Use Cases

11 Kotlin: Accessing and Updating Elements in an Array

12 Kotlin: Iterating Through Arrays with Loops and `forEach`

13 Kotlin: Finding the Index of an Element in an Array

14 Checking if an Array Contains a Specific Value in Kotlin

15 Filtering Arrays with `filter` and `filterNot` in Kotlin

16 Sorting Arrays in Kotlin: Ascending and Descending

17 Combining Arrays: Merging and Zipping in Kotlin

18 Converting Arrays to Lists, Sets, or Maps in Kotlin

19 Using `binarySearch` with Sorted Arrays in Kotlin

20 Reversing an Array in Kotlin

21 Finding the Minimum and Maximum in an Array in Kotlin

22 Working with Multidimensional Arrays in Kotlin

23 Creating Immutable Lists with `listOf` in Kotlin

24 Kotlin - Working with Mutable Lists Using `mutableListOf`

25 Adding and Removing Elements in a List in Kotlin

26 Accessing Elements by Index in Lists in Kotlin

27 Sorting Lists in Kotlin: Natural and Custom Order

28 Filtering Lists with Conditions in Kotlin

29 Kotlin: Finding the First, Last, or Specific Element in a List

30 Calculating the Sum, Average, and Median of List Elements in Kotlin

31 Removing Duplicate Elements from a List in Kotlin

32 Partitioning Lists into Groups in Kotlin

33 Transforming Lists with `map` and `flatMap` in Kotlin

34 Grouping Lists by a Property in Kotlin

35 Reversing and Shuffling Lists in Kotlin

36 Checking if a List Contains a Given Value in Kotlin

37 Introduction to Sets in Kotlin

38 Creating Immutable and Mutable Sets in Kotlin

39 Adding, Removing, and Updating Elements in a Set in Kotlin

40 Kotlin: Checking for Unique Elements and Duplicates in Sets

41 Kotlin Set Operations: Union, Intersection, and Difference

42 Sorting and Filtering Elements in a Set in Kotlin

43 Converting Sets to Other Collection Types in Kotlin

44 Checking if a Set Contains a Value in Kotlin

45 Iterating Over Set Elements in Kotlin

46 Understanding Maps in Kotlin: Key-Value Pairs

47 Creating Maps with `mapOf` and `mutableMapOf` in Kotlin

48 Adding, Updating, and Removing Entries in a Map in Kotlin

49 Accessing Values by Key in a Map in Kotlin

50 Using Default Values with `getOrDefault` in Kotlin

51 Checking if a Map Contains a Key or Value in Kotlin

52 Sorting Maps by Keys or Values in Kotlin

53 Iterating Through Maps in Kotlin: Keys, Values, and Entries

54 Merging Two Maps in Kotlin

55 Kotlin: Grouping and Counting Elements in Maps

56 Kotlin: How to Search for an Element in a Collection

57 Kotlin: Finding an Element’s Index in Arrays, Lists, or Sets

58 Kotlin: Using `find` and `findLast` to Locate Elements

59 Kotlin: Filtering Elements with `filter` and `filterNot`

60 Kotlin: Advanced Filtering with `filterIsInstance`

61 Using `first`, `last`, and `single` in Kotlin

62 Performing Aggregations in Kotlin: Sum, Count, and Average

63 Calculating Variance and Standard Deviation in Kotlin

64 Using `reduce` and `fold` for Custom Aggregations in Kotlin

65 Finding the Minimum and Maximum in a Collection in Kotlin

66 Counting Elements That Meet a Specific Condition in Kotlin

67 Combining Collections with `zip` and `plus` in Kotlin

68 Flattening Nested Collections with `flatten` in Kotlin

69 Using `chunked` to Split Collections into Smaller Parts in Kotlin

70 Removing Elements with `removeIf` and `drop` Functions in Kotlin

71 Shuffling and Randomizing Collections in Kotlin

72 Joining Collections into Strings with `joinToString` in Kotlin

73 Building a To-Do List App with Kotlin Collections

74 Using Collections for Data Processing in APIs in Kotlin

75 Sorting User Data Using Built-in Collection Methods in Kotlin

76 Creating Nested Collections for Complex Data Structures in Kotlin

77 Efficiently Managing Data with Kotlin Collection Utilities

78 Real-World Applications of Kotlin’s Collection Framework