Keep a double end queue or a heap in order to keep the actual visual order of the available to be printed into the data sync
Keep a double end queue or a heap in order to keep the actual visual order of the available to be printed into the data sync