I have been struggling for creating a comparator for sorting and priority queue for a long time,any tips,resources,help,arcticles would be helpful.Usually,I create a lambda function and do hit and trial,until I obtain my desired results,but I would love to work on that.