Returns the least element of elements by comparator (natural order when omitted), the first
one found among equals, or undefined when there is none. A single element is returned without a
comparison. Because undefined also means "empty", an input holding only undefined cannot be
told from an empty one; check size first when that matters.
Returns the least element of
elementsbycomparator(natural order when omitted), the first one found among equals, orundefinedwhen there is none. A single element is returned without a comparison. Becauseundefinedalso means "empty", an input holding onlyundefinedcannot be told from an empty one; checksizefirst when that matters.Time: O(n), exactly n − 1 comparator calls.