I feel sorting and then finding min is gonna take more time for small number of values.. Sorting time complexity is around nlogn and then finding minimum is n.. overall solution is nlogn + n.. Brute force solution is I think nsq(2). Not much of a difference
You should never compare solutions with a small dataset. The results will always be undeterministic. A good solution is always one which can scale up efficiently 🙂