Computer scienceProgramming languagesKotlinTypes and data structuresLists

Mutable Map and Mutable Set as interfaces

Quiz: Pairing collection functions

Report a typo

Hey there! This problem might be a bit unpredictable, but give it a go and let us know how you do!

Match the following functions and properties of mutable collections in Kotlin with their correct descriptions.

Match the items from left and right columns
mutableMapOf()
mutableSetOf()
put(key, value)
remove(element)
clear()
Removes a single instance of the specified element from this collection, if it is present.
Associates the specified value with the specified key in the map.
Generates a new mutable set containing the items passed to it.
Creates a new mutable map with the provided key-value pairs.
Removes all elements from this collection.

Create a free account to access the full topic