Complete the evenFilter() function that takes a Set of Int and returns a new set containing only the even elements from that set. Don't use the += operator: work with MutableSet because it is faster than reassigning.
Mutable Set
Filter
Report a typo
Sample Input 1:
1 2 3 4 5 6 7 8Sample Output 1:
2 4 6 8Write a program in Kotlin
fun evenFilter(numbers: Set<Int>): Set<Int> {
// put your code here
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.