Justifying Sock Pile via Bubblesort

Because, clearly, socks are a complex problem that requires the most basic of algorithms

Here's the algorithmic approach:

But honestly, who needs this when you have QuickSort? Or just use Heapsort, the hipster's choice

Now you have a justifiably sorted sock pile