Skip to content

Instantly share code, notes, and snippets.

@fancellu
Created November 3, 2015 15:18
Show Gist options
  • Save fancellu/95552ea77e860e0ffc93 to your computer and use it in GitHub Desktop.
Save fancellu/95552ea77e860e0ffc93 to your computer and use it in GitHub Desktop.
Pangrams for HackerRank
def isPangram(strings: Array[String]): String = {
val values=for{
string<-strings
set=string.toLowerCase().toSet
isPangram=('a' to 'z').forall(set.contains)
} yield if (isPangram) 1 else 0
values.mkString
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment