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
- hackerrank
- leetcode
- gs25
- 데이콘
- Baekjoon
- 편스토랑
- 우분투
- Kaggle
- 파이썬
- 프로그래머스 파이썬
- programmers
- 백준
- ChatGPT
- 프로그래머스
- Git
- 자연어처리
- 금융문자분석경진대회
- SW Expert Academy
- AI 경진대회
- github
- 편스토랑 우승상품
- 캐치카페
- Docker
- Real or Not? NLP with Disaster Tweets
- ubuntu
- 맥북
- 더현대서울 맛집
- dacon
- 코로나19
- PYTHON
Archives
- Today
- Total
목록
반응형
Majority Element (1)
반응형
솜씨좋은장씨
[leetCode] 169. Majority Element (Python)
Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the array is non-empty and the majority element always exist in the array. Example 1: Input: [3,2,3] Output: 3 Example 2: Input: [2,2,1,1,1,2,2] Output: 2 Solution class Solution: def majorityElement(self, nums: List[int]) -> int: keys = set(nums) ans..
Programming/코딩 1일 1문제
2020. 6. 23. 01:05
반응형