|
| 1 | +<h2><a href="https://leetcode.com/problems/element-appearing-more-than-25-in-sorted-array/"><div id="big-omega-company-tags"><div id="big-omega-topbar"><div class="companyTagsContainer" style="overflow-x: scroll; flex-wrap: nowrap;"><div class="companyTagsContainer--tag" style="background-color: rgba(0, 10, 32, 0.05);"><div>Facebook</div><div class="companyTagsContainer--tagOccurence">5</div></div><div class="companyTagsContainer--tag" style="background-color: rgba(0, 10, 32, 0.05);"><div>Google</div><div class="companyTagsContainer--tagOccurence">2</div></div></div><div class="companyTagsContainer--chevron"><div><svg version="1.1" id="icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 32 32" fill="#4087F1" xml:space="preserve" style="width: 20px;"><polygon points="16,22 6,12 7.4,10.6 16,19.2 24.6,10.6 26,12 "></polygon><rect id="_x3C_Transparent_Rectangle_x3E_" class="st0" fill="none" width="32" height="32"></rect></svg></div></div></div></div>1287. Element Appearing More Than 25% In Sorted Array</a></h2><h3>Easy</h3><hr><div><p>Given an integer array <strong>sorted</strong> in non-decreasing order, there is exactly one integer in the array that occurs more than 25% of the time, return that integer.</p> |
| 2 | + |
| 3 | +<p> </p> |
| 4 | +<p><strong class="example">Example 1:</strong></p> |
| 5 | + |
| 6 | +<pre><strong>Input:</strong> arr = [1,2,2,6,6,6,6,7,10] |
| 7 | +<strong>Output:</strong> 6 |
| 8 | +</pre> |
| 9 | + |
| 10 | +<p><strong class="example">Example 2:</strong></p> |
| 11 | + |
| 12 | +<pre><strong>Input:</strong> arr = [1,1] |
| 13 | +<strong>Output:</strong> 1 |
| 14 | +</pre> |
| 15 | + |
| 16 | +<p> </p> |
| 17 | +<p><strong>Constraints:</strong></p> |
| 18 | + |
| 19 | +<ul> |
| 20 | + <li><code>1 <= arr.length <= 10<sup>4</sup></code></li> |
| 21 | + <li><code>0 <= arr[i] <= 10<sup>5</sup></code></li> |
| 22 | +</ul> |
| 23 | +</div> |
0 commit comments