Java Priority Queue

  • + 1 comment

    I have implemented same logic but my sorting changes as soon as I add Anik to the queue. and gives output as Dan Ashley Maria Shafaet Do you have any idea, why my code is behaving like this?