Skip to content

Instantly share code, notes, and snippets.

@vitek999
Created February 6, 2020 15:20
Show Gist options
  • Save vitek999/f90a880adbd525fd437da4527b5b347d to your computer and use it in GitHub Desktop.
Save vitek999/f90a880adbd525fd437da4527b5b347d to your computer and use it in GitHub Desktop.
class Solution {
fun isAnagram(s: String, t: String): Boolean {
if(s.length != t.length) return false
return s.toCharArray().sortedArray().contentEquals(t.toCharArray().sortedArray())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment