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