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 | 31 |
Tags
- API
- lol
- 알고리즘
- github
- 파이썬
- sort
- programmers
- Riot
- 스파르타내일배움캠프
- 자바
- 라이엇
- 코딩테스트
- Django
- 그리디
- drf
- 백준
- 그리디알고리즘
- 롤
- python
- 코딩테스트준비
- 리그오브레전드
- 탐욕알고리즘
- 내일배움캠프
- java
- 스파르타내일배움캠프TIL
- greedy
- SQL
- 프로그래머스
- 장고
- git
Archives
- Today
- Total
목록시간복잡도 (1)
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