所有公开日志

所有WHY42公开日志的联合展示。您可以通过选择日志类型、输入用户名(区分大小写)或相关页面(区分大小写)筛选日志条目。

日志
  • 2024年2月19日 (一) 14:01 Riguz 讨论 贡献创建了页面169.Majority Element (创建页面,内容为“=Description= {{LeetCode |id=majority-elemen |no=169 |difficulty=Easy |category=Array |collection=Top 150 |title=Majority Element |summary=Given an array nums of size n, return the majority element..}} The majority element is the element that appears more than ⌊n / 2⌋ times. You may assume that the majority element always exists in the array. Example 1: <syntaxhighlight lang="bash"> Input: nums = [3,2,3] Output: 3 </syntaxhighlight> Example 2: <syntaxhi…”)