Scala permutation of Factorials

前端 未结 2 1975
感动是毒
感动是毒 2021-01-23 20:25

How can I find the n! permutations of certain letters on Scala?

2条回答
  •  广开言路
    2021-01-23 20:39

    Scala 2.9 RC1:

    scala> "abc".permutations.toList
    res58: List[String] = List(abc, acb, bac, bca, cab, cba)
    

提交回复
热议问题