Answers for "scala list all permutations"

0

scala list all permutations

scala> List(1,2,3).permutations.mkString("\n")
res3: String = 
List(1, 2, 3)
List(1, 3, 2)
List(2, 1, 3)
List(2, 3, 1)
List(3, 1, 2)
List(3, 2, 1)
Posted by: Guest on April-03-2022

Code answers related to "Scala"

Browse Popular Code Answers by Language