Skip to content

Instantly share code, notes, and snippets.

@mertceyhan
Created February 1, 2022 22:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mertceyhan/d72f83be6be8bbe04b35b2f6dce25a04 to your computer and use it in GitHub Desktop.
Save mertceyhan/d72f83be6be8bbe04b35b2f6dce25a04 to your computer and use it in GitHub Desktop.
Answer of classic anagram question with Kotlin
object Anagram {
fun isAnagram(firstText: String, secondText: String): Boolean {
return firstText.sumOf { it.code } == secondText.sumOf { it.code }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment