Pergunta de entrevista da empresa Adobe

Find 2nd largest number in an array of integers

Resposta da entrevista

Sigiloso

15 de set. de 2022

First need to sort out the array using inbuild function or write any sorting algorithm like Bubble, Quick or Merge, whatever algo seems more efficient then just set the index 2 to get the second largest. Below is a simple javascript solution getSecondLargest(arr, len) { return len b - a)[1]; }