Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- 백준
- Git
- 프로그래머스 파이썬
- SW Expert Academy
- 편스토랑 우승상품
- AI 경진대회
- dacon
- gs25
- 코로나19
- Real or Not? NLP with Disaster Tweets
- 편스토랑
- Kaggle
- programmers
- leetcode
- ChatGPT
- PYTHON
- 우분투
- ubuntu
- 프로그래머스
- 맥북
- 캐치카페
- Baekjoon
- 금융문자분석경진대회
- 파이썬
- Docker
- 데이콘
- 자연어처리
- github
- 더현대서울 맛집
- hackerrank
Archives
- Today
- Total
솜씨좋은장씨
[leetCode] 1961. Check If String Is a Prefix of Array (Python) 본문
Programming/코딩 1일 1문제
[leetCode] 1961. Check If String Is a Prefix of Array (Python)
솜씨좋은장씨 2022. 1. 31. 00:33728x90
반응형
코딩 1일 1문제! 오늘의 문제는 leetCode의 Check If String Is a Prefix of Array 입니다.
Check If String Is a Prefix of Array - LeetCode
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
leetcode.com
👨🏻💻 코드 ( Solution )
class Solution:
def isPrefixString(self, s: str, words: List[str]) -> bool:
answer = False
check_string = ""
for word in words:
check_string += word
if len(check_string) > len(s):
break
if check_string == s:
answer = True
break
return answer
GitHub - SOMJANG/CODINGTEST_PRACTICE: 1일 1문제 since 2020.02.07
1일 1문제 since 2020.02.07. Contribute to SOMJANG/CODINGTEST_PRACTICE development by creating an account on GitHub.
github.com
'Programming > 코딩 1일 1문제' 카테고리의 다른 글
[leetCode] 2119. A Number After a Double Reversal (Python) (0) | 2022.02.02 |
---|---|
[leetCode] 2057. Smallest Index With Equal Value (Python) (0) | 2022.02.01 |
[BaekJoon] 13706번 : 제곱근 (Python) (1) | 2022.01.30 |
[BaekJoon] 2163번 : 초콜릿 자르기 (Python) (0) | 2022.01.29 |
[leetCode] 2000. Reverse Prefix of Word (Python) (0) | 2022.01.28 |
Comments