priority queue using linked list and test cases corrected