Reverse / transpose a one-to-many map in Scala

后端 未结 0 1984
感情败类
感情败类 2021-02-13 07:33

What is the best way to turn a Map[A, Set[B]] into a Map[B, Set[A]]?

For example, how do I turn a

Map(1 -> Set(\"a\", \"b\")         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题