Skip to content
Jin-Wook Chung edited this page May 25, 2016 · 20 revisions

2016-05-25

hello world - 김태완

class Anagram(word:String) {
  def matches(words:Seq[String]):Seq[String] = {
    val lowerWord = word.toLowerCase
    words.filterNot(_.toLowerCase == lowerWord).filter(_.toLowerCase.sorted==lowerWord.sorted)
  }
}
Clone this wiki locally