Anonymous
the most naive way is to sort the array in the decreasing order and then take the 18th element of the array. The best way to sort the array is to use the decothomic technic whose complexity is O(log(n)).
Microsoft
Criteo
Rivian
Postmates
Mailchimp
Agoda
Contribute your knowledge to access all answers
#Give&Take - Share to unlock
Interview question asked to Machine Learning Engineers interviewing at Microsoft, Workday, Zoom and others: Can you identify the 18th largest element in this array?.