Some error occured while loading page for you. Please try again.
We use cookies to ensure you have the best browsing experience on our website.
Please read our cookie policy for more information about how we use cookies.
I think my code does that but still #4 can't pass:
1) I corrected my code to return mode as an integer
2) Here is how i find the mode: (i) Generate a list of tuples as (integer, frequency), (ii) sort tuples by frequency then by integers in ascending way, (iii) return "integer" of the first tuple.
I am thinking maybe there is something concerning in your (ii), where do you make sure that the after sorting by integers, you still maintain the order of frequency?
I think my code does that but still #4 can't pass: 1) I corrected my code to return mode as an integer 2) Here is how i find the mode: (i) Generate a list of tuples as (integer, frequency), (ii) sort tuples by frequency then by integers in ascending way, (iii) return "integer" of the first tuple.
Add Reply Preview cancel