Hey, Im trying to figure out how to get my compareTo method to work right for my circular doubly linked list. The one I have works fine when I use it on my bubbleSort() method, but it wont work on any other sort I try. The sorts Ive tried are selectionSort(), selectionSortNoSelfSwaping
(), and insertionSort(). I get stuck in an infinit loop when I hit the compareTo part of those 3 sorts I mentioned. Well here is the compareTo method im using.
If you need more info about my program ill be on for at least 5 or so hours and can repost more code.
public class DLL implements Comparable<Node>//Implementing the comparable interface
//all the normal things u have with a circular doubly linked list with dummy head.
// also have the Node class with all the basic things.
public int compareTo(Node that)
//The Node class has fields of