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 |
Tags
- AI 경진대회
- leetcode
- 편스토랑 우승상품
- Git
- ubuntu
- ChatGPT
- dacon
- 우분투
- Docker
- 캐치카페
- github
- 프로그래머스
- 코로나19
- 편스토랑
- Real or Not? NLP with Disaster Tweets
- SW Expert Academy
- 맥북
- programmers
- hackerrank
- 프로그래머스 파이썬
- 파이썬
- Baekjoon
- PYTHON
- 데이콘
- Kaggle
- gs25
- 더현대서울 맛집
- 자연어처리
- 금융문자분석경진대회
- 백준
Archives
- Today
- Total
목록
반응형
최빈값 구하기 (1)
반응형
솜씨좋은장씨

코딩 1일 1문제! 오늘의 문제는 프로그래머스의 최빈값 구하기 입니다. 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 👨🏻💻 코드 ( Solution ) def solution(array): answer = -1 freq_check = {} for num in array: if num not in freq_check: freq_check[num] = 0 freq_check[num] += 1 freq_items = sorted(freq_check.items(), key=lambda x: (-x[1])) if (len(freq_items) > 1 and f..
Programming/코딩 1일 1문제
2023. 1. 28. 23:20
반응형