Skip to content

Instantly share code, notes, and snippets.

@sudipto80
Created December 12, 2018 02:54
Show Gist options
  • Save sudipto80/ecf9fd4b81c8136c7b8ef922512f7496 to your computer and use it in GitHub Desktop.
Save sudipto80/ecf9fd4b81c8136c7b8ef922512f7496 to your computer and use it in GitHub Desktop.
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