SORT LINKED LIST


my code is failing the test cases but sample input runs fine why?