View Single Post
jedishrfu
#4
Feb21-12, 04:21 PM
P: 2,928
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 head=head.link assignment so on your next pass you won't know where to begin.