Closed rifazjeoffrey78 closed 6 days ago
LeetCode Support commented: Thank you for reaching out with your concern. Upon reviewing your report, it appears there may be some confusion regarding the problem statement. The problem assumes that the input array always contains a majority element, which means an element that appears more than ⌊n / 2⌋ times. In your example [1,1,2,3,4,5,6], no element appears more than 3 times, so this input would not meet the problem constraints as given in the description. If you have any further questions or need additional clarification, I recommend revisiting the problem statement and reviewing the provided examples. Please let us know if there's anything else we can do for you.
LeetCode Support Team
LeetCode Username
rifazjeoffrey
Problem Number, Title, and Link
Bug Category
Missing test case (Incorrect/Inefficient Code getting accepted because of missing test cases)
Bug Description
what if input is [1,1,2,3,4,5,6]. Answer should be 1 but 6 may be chosen
Language Used for Code
Python/Python3
Code used for Submit/Run operation
Expected behavior
should return 1
Screenshots
No response
Additional context
No response