View Single Post
Feb21-12, 04:21 PM
P: 3,091
Linked list sorting method in java

on each loop thru looking for the largest don't you have to reset the largest back to Integer.MIN_VALUE?

it looks like your solution only makes one pass thru the list to find the largest. also your original head value is getting changed with assignment so on your next pass you won't know where to begin.