Skip to content

Instantly share code, notes, and snippets.

@WeAthFoLD
Created April 17, 2017 15:13
Show Gist options
  • Save WeAthFoLD/f89856c3c5bf29799551e1c2bd9ca7b4 to your computer and use it in GitHub Desktop.
Save WeAthFoLD/f89856c3c5bf29799551e1c2bd9ca7b4 to your computer and use it in GitHub Desktop.
class Solution {
func isPalindrome(_ x: Int) -> Bool {
var y: String = x.description
if x < 0 {
return false
}
var count = y.characters.count
for i in 0..<count/2{
guard y.characters.removeFirst() == y.characters.removeLast() else{
return false
}
}
return true
}
}
@JuanJuanCloud
Copy link

JuanJuanCloud commented Apr 17, 2017

thans a lot,but u forget the question number,what a pity(/ω\)

fat wolf: what a pity QAQ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment