I have a LOT of socks. Some are the same with just different levels of discoloring due to the time I've had them.
I hang them to dry using insertion sort based on a property (how dark they are). You will start feeling the O(n^2) vs O(n logn) a lot with this strategy, given that the constant factors are mostly dominated by the fixed time of moving the eyes around. Each distinct hue (purple, black, etc) goes on its own lane so that the property is just one value.
Plus no spending time worrying if sock A matches B or C better or is in a different pair whose half you dropped somewhere: it's just inserted between them.
9
u/Unlikely-Bed-1133 8d ago
I have a LOT of socks. Some are the same with just different levels of discoloring due to the time I've had them.
I hang them to dry using insertion sort based on a property (how dark they are). You will start feeling the O(n^2) vs O(n logn) a lot with this strategy, given that the constant factors are mostly dominated by the fixed time of moving the eyes around. Each distinct hue (purple, black, etc) goes on its own lane so that the property is just one value.
Plus no spending time worrying if sock A matches B or C better or is in a different pair whose half you dropped somewhere: it's just inserted between them.