You are viewing a single comment's thread. Return to all comments →
Hi, I believe this code is correct only in the cases where the max number apears only once in the input.
Considering the following input [1, 2, 2] it would return 2 whereas it should return 1.
Seems like cookies are disabled on this browser, please enable them to open this website
Find the Runner-Up Score!
You are viewing a single comment's thread. Return to all comments →
Hi, I believe this code is correct only in the cases where the max number apears only once in the input.
Considering the following input [1, 2, 2] it would return 2 whereas it should return 1.