Add new test case [8,8,7,7,6,7,5]

  • -2

    I find a solution is better than mine to deal with this problem. However, when read his code carefully, I am not sure that if the problem can be solved totally by the code. Therefore, I copy the code to leetcode, and it is accepted. But I still feel puzzled, which leads me to make a test code, such as [8,8,7,7,6,7,5]. the expected reasult of this test case is 5. Apparently it is not. So maybe this test case can be added?

  • 1

    Notice that :MORE THAN, so 7 is not majority defined by this prob.

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.