Skip to content

Instantly share code, notes, and snippets.

@marti1125
Created April 13, 2019 20:18
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 marti1125/2546860b31f9e7fd4dbdf2dd357b93cb to your computer and use it in GitHub Desktop.
Save marti1125/2546860b31f9e7fd4dbdf2dd357b93cb to your computer and use it in GitHub Desktop.
checkPalindrome
import "strings"
func checkPalindrome(inputString string) bool {
var p []string
for i := len(inputString)-1; i >= 0; i-- {
p = append(p, string(inputString[i]))
}
sj := strings.Join(p,"")
if sj == inputString {
return true
} else {
return false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment