Meta Interview Question

Find the smallest 3 integers in an array in O(n) time.

Interview Answers

Anonymous

Jan 25, 2019

Iterate through each element, maintain a list of the 3 smallest integers.

Anonymous

Mar 8, 2020

yeah..that would be a way. or quickselect algorithm. these are the only two ways.