For this fixed five-point input, the brute-force and median-based approaches are equally viable because they both run in constant time O(1).