Given the string, check if it is a palindrome.
해당 문자열을 고려하여 회문인지 확인하라
Example
- For
inputString = "aabaa"
, the output should becheckPalindrome(inputString) = true
; - For
inputString = "abac"
, the output should becheckPalindrome(inputString) = false
; - For
inputString = "a"
, the output should becheckPalindrome(inputString) = true
.
Code
boolean checkPalindrome(String inputString) {
2
12
}
'알고리즘(CF)' 카테고리의 다른 글
5. shapeArea (1) | 2017.06.07 |
---|---|
4. adjacentElementsProduct (1) | 2017.06.07 |
2. centuryFromYear (1) | 2017.06.07 |
1. add (1) | 2017.06.07 |
https://codefights.com (0) | 2017.06.07 |