Skip to the content.

Asked by Facebook

Question

Given an array of numbers of length N, find both the minimum and maximum using less than 2 * (N - 2) comparisons.