What would the right answer for this test case be?


  • 0
    A

    int[] nums = {1,4,3,4,5,4,5,4,5};

    The expected answer according to the solution is 5. But shouldn't it be 4?
    Count(4) = 4
    Count(5) = 3
    nums.length = 9


Log in to reply
 

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