일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- 수 정렬하기
- markdown
- data_structure
- recursion
- matrixElementsSum
- Numpy
- Daily Commit
- almostIncreasingSequence
- Counting cells in a blob
- cpp
- 파이썬 포렌식
- Sequential Search
- 2750
- 백준
- flask
- shapeArea
- Python
- 2015 봄학기 알고리즘
- adjacentElementsProduct
- baekjun
- codesingal
- 피보나치 수
- 10953
- C++
- til
- 파이썬머신러닝완벽가이드
- centuryFromYear
- collections.deque
- All Longest Strings
- codesignal
Archives
- Today
- Total
Introfor
[Intro] checkPalindrome 본문
Given the string, check if it is a palindrome.
주어진 string 값이 회문구조(palindrome, 앞에서부터 읽으나, 뒤에서부터 읽으나 동일한 단어나 구)를 가지는지 판별.
def checkPalindrome(s):
if s == s[::-1]:
return True
else:
return False
기존에 주어진 string s와 그 값의 역수를 비교해서 같으면 True를 반환하고, 아니면 False를 반환
여기까지 그저 맛보기에 불과했다. 이때까지 몰랐다. 부딪히고 난 뒤부터 내가 헤쳐나가야 할 고난들이 너무 많다는 걸 깨닫게 된다.
'Programming_prob > Codesignal' 카테고리의 다른 글
[Intro] Make Array Consecutive 2 (0) | 2020.07.18 |
---|---|
[Intro] shapeArea (0) | 2020.07.18 |
[Intro] adjacentElementsProduct (0) | 2020.07.18 |
[Intro] centuryFromYear (0) | 2020.07.18 |
[Intro] add (0) | 2020.07.18 |
Comments