Questa è la tua azienda?
Find the second smallest element in an array.
Anonimo
Went with two variables which mainted the current least two elements and then returned the second lease. Took care of edge cases like <2 elements.
Arrays.sort(arr); arr[length-1] would do this
Non lasciarti sfuggire opportunità e informazioni privilegiate seguendo le aziende dove vorresti lavorare.
Ricevi suggerimenti e aggiornamenti personalizzati avviando le tue ricerche.