Whatfix interview question

Java coding - top n numbers in input lust