My LeetCode grinding. Trying to do a problem a day.
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

problem.txt 312B

1234567891011121314
  1. Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.
  2. You may assume that the array is non-empty and the majority element always exist in the array.
  3. Example 1:
  4. Input: [3,2,3]
  5. Output: 3
  6. Example 2:
  7. Input: [2,2,1,1,1,2,2]
  8. Output: 2