Created
December 12, 2018 02:54
-
-
Save sudipto80/ecf9fd4b81c8136c7b8ef922512f7496 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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