Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
package hello
fun main() {
var xs = listOf(listOf(1,2,3),
listOf(1,5,6,2),
listOf(7,8,2,11,1))
var result = xs[0]
for(i in 1 .. xs.size - 1)
{
result = result.intersect(xs[i]).toList()
}
println(result)
println("Hello World")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment