All you have to do is start the game, and it will sort automatically. First, it will randomise, then it will begin to organise a couple at a time, doing more as it progresses. When you're finished, it should be perfectly organized.
This is based on some videos I've seen on YouTube. This one uses the most basic organisational algorithm I believe. This may be intensive for your PC, but give it a shot anyway!