Tokopedia interview question

How to optimize the previous coding test and code to find a number that has the most occurrence