Skip to content

Latest commit

 

History

History

largest-elements

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Write a program that outputs the top n elements from a list.

Example:

largest(2, new int[]{7, 6, 5, 4, 3, 2, 1})
// => new int[]{6, 7}