Strings: Making Anagrams

  • + 0 comments

    Scala

    def makeAnagram(a: String, b: String): Int = {
            val anagram = a intersect b
            (a.length - anagram.length) + (b.length - anagram.length)
        }