Finding and starting a thread

Report a typo

Implement a function that takes an array of threads, finds the first thread that has not been started yet, and starts it.

The found thread must be terminated before the implemented function is completed.

The testing system will give you some hints throwing exceptions in the main thread, like:

Exception in thread "main" java.lang.RuntimeException: Found thread must be terminated before ending the implemented function
Write a program in Kotlin
fun findAndStartThread(threads: List<Thread>) {
// implement this function
}
___

Create a free account to access the full topic