Find the minimum and maximum integers in an array, without using builtins Challenge

Given an array of integers, received from stdin, function arguments, program arguments, or some other method:

Output only the minimum and maximum numbers in the array, through a return value, stdout, or other fitting methods.

Example session

&gt; minmax( {0, 15, 2, 3, 7, 18, -2, 9, 6, -5, 3, 8, 9, -14} )
-14 18


Reference implementation

// C++14

void minmax(std::vector&lt;int&gt; v) {
    int min = v[0]; int max = v[0];
    for(auto it : v) {
        if (*it &lt; min)
            min = *it;
        if (*it &gt; max)
            max = *it;
    }
    std::cout &lt;&lt; min &lt;&lt; ' ' &lt;&lt; max &lt;&lt; std::endl;
}


Rules


You may not use a built-in function to calculate the values.
Standard loopholes disallowed.
Creative implementations encouraged.
This is code-golf, shortest answer wins but will not be selected.


Clarifications


If the array contains 1 element you need to output it twice.
If the minimum and maximum values are the same, you need to output them both.
Jelly, 3 bytes

Ṣ.ị


Try it online!

Sort the array, and then takes the 0.5-th element.

Jelly uses 1-indexing, and floating points indexing means take its floor and its ceil.

So the 0.5-th element would give you the 0th element and the 1st element.

The 0th element is the last element.