Skip to content

Instantly share code, notes, and snippets.

@0xch4z
Created September 26, 2017 01:22
Show Gist options
  • Select an option

  • Save 0xch4z/bf1e39d88ed9082fc6f9b16496fd4f52 to your computer and use it in GitHub Desktop.

Select an option

Save 0xch4z/bf1e39d88ed9082fc6f9b16496fd4f52 to your computer and use it in GitHub Desktop.
func isPalindrome(_ s: String) -> Bool {
return s == Array(s.characters).reversed().map{String($0)}.reduce("",+)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment