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
- Baekjoon
- 더현대서울 맛집
- SW Expert Academy
- 자연어처리
- ChatGPT
- 금융문자분석경진대회
- 프로그래머스 파이썬
- 편스토랑
- Real or Not? NLP with Disaster Tweets
- 파이썬
- 프로그래머스
- 데이콘
- 코로나19
- Docker
- gs25
- hackerrank
- programmers
- Kaggle
- 백준
- github
- 편스토랑 우승상품
- AI 경진대회
- PYTHON
- ubuntu
- dacon
- leetcode
- 우분투
- 맥북
Archives
- Today
- Total
목록
반응형
821. Shortest Distance to a Character (1)
반응형
솜씨좋은장씨
[leetCode] 821. Shortest Distance to a Character (Python)
Given a string S and a character C, return an array of integers representing the shortest distance from the character C in the string. Example 1: Input: S = "loveleetcode", C = 'e' Output: [3, 2, 1, 0, 1, 0, 0, 1, 2, 2, 1, 0] Note: S string length is in [1, 10000]. C is a single character, and guaranteed to be in string S. All letters in S and C are lowercase. 첫번째 시도 class Solution: def shortest..
Programming/코딩 1일 1문제
2021. 1. 8. 04:05
반응형