Now outputing the sorted occurrence, but needs improvements. Added the comparator, however for the descending, I heard to tweak and multiply by -1. A better solution will come