Custom sorted linked list with timelimit problem.