CHIqueen

[Intro] checkPalindrome 본문

프로그래밍/CodeSignal

[Intro] checkPalindrome

사용자 CHIqueen 2020. 2. 26. 21:48

Given the string, check if it is a palindrome.

 

Example

  • For inputString = "aabaa", the output should be
    checkPalindrome(inputString) = true;
  • For inputString = "abac", the output should be
    checkPalindrome(inputString) = false;
  • For inputString = "a", the output should be
    checkPalindrome(inputString) = true.
def checkPalindrome(inputString):
    return inputString==inputString[::-1]

 

'프로그래밍 > CodeSignal' 카테고리의 다른 글

[Intro] shapeArea  (0) 2020.03.03
[Intro] Make Array Consecutive 2  (0) 2020.03.03
[Intro] adjacentElementsProduct  (0) 2020.03.03
[Intro] checkPalindrome  (0) 2020.02.26
[Intro] centuryFromYear  (0) 2020.02.26
[Intro] add  (0) 2020.02.26
0 Comments
댓글쓰기 폼