Flowchart of stable sorting in Java