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
Anonymous
Prepare for success with realistic, role-specific interview simulations.
Try AI Interview NowInterview question asked to Machine Learning Engineers interviewing at Microsoft, Workday, Zoom and others: Can you identify the 18th largest element in this array?.