How does the order of ones sins show whether or not his sins have been forgiven?
On Daf 57a it says that if one dreams that he is undergoing a blood-letting, it means that his sins are forgiven. But the gemora asks that another teaching says that the dream means that his sins are arranged in order? It answers that the meaning is that his sins are arranged in order so as to be forgiven.
What the gemora means is that when his sins are arranged in order they are certainly going to be forgiven. Because, as it says many times in the Selichos prayers, Hashem “removes the first”, that is, the sin which should be placed first on the scales of justice Hashem puts aside and does not place on the scales. Therefore, if a person’s sins are equal to his good deeds the scales will tilt in his favor since the first sin was not added to the scales. But, as Rava teaches in the gemora Rosh Hashanah 17a, this first sin is not erased, and if it turns out that his sins are more than his good deeds then this sin is reckoned together with the others.
Hence, if a person is a Tzaddik whose good deeds exceed his sins, or even if he is an average person whose sins equal his good deeds, his sins will be placed on the scales in order starting from the second sin since the first sin has been set aside. And if they remain in order then he is certainly not among those whose sins exceed their good deeds, because if he was the first sin which had initially been set aside will be added to the scales at the end, as Rava taught, and consequently the sins would no longer be in order since the first sin would be placed after the last.
This then is the meaning of the gemora, that when his sins are arranged in order, which shows that the first sin was not added to the scales at the end, his sins have certainly been forgiven.