I need for homework to get the most "popular" number in an array (the number in the highest frequency), and if there are several numbers with the same number of shows, get some number randomly. After more then three hours of trying, and either searching the web, this is what I got: I need for homework to get the most "popular" n