Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 파이썬
- git
- 코딩테스트
- 그리디
- lol
- 탐욕알고리즘
- 롤
- 스파르타내일배움캠프TIL
- 스파르타내일배움캠프
- 장고
- Riot
- python
- sort
- 알고리즘
- 백준
- greedy
- 리그오브레전드
- github
- Django
- programmers
- drf
- API
- 프로그래머스
- 그리디알고리즘
- 자바
- 코딩테스트준비
- 내일배움캠프
- SQL
- java
- 라이엇
Archives
- Today
- Total
목록스파르타 내일 배움 캠프 AI 웹개발 과정/algorithm & data structure (11)
Lina's Toolbox

최빈값 찾기Q. 다음과 같은 문자열을 입력받았을 때, 어떤 알파벳이 가장 많이 포함되어 있는지 반환하시오"hello my name is sparta" 두 개의 다른 방법으로 풀이.import stringfrom pprint import pprinttext = 'hello, this is sparta'counter = {}# 21 번 연산for char in text: # .isalpha() 알파벳인지 체크 if not char.isalpha(): continue # 알파벳이 아니라면 넘어감 if char in counter: counter[char] += 1 else: counter[char] = 1 #pretty print 내장함수..
스파르타 내일 배움 캠프 AI 웹개발 과정/algorithm & data structure
2024. 7. 10. 15:48