Search:

Type: Posts; User: Kaisshau

Search: Search took 0.39 seconds.

  1. Replies
    9
    Views
    325

    Re: Sorting problem

    Is it possible it's calling my else statement that calls for recursion even when it's not supposed to? I'm having problems with another program doing a similar thing.
  2. Replies
    9
    Views
    325

    Re: Sorting problem

    I think somehow my testNode and currentNode are getting set to the same thing and end up pointing at each other. I think it
    s in this part:

    else if (test.getData() >...
  3. Replies
    9
    Views
    325

    Re: Sorting problem

    So that the first two if statements in my sortRecur method will evaluate to true if the first value is lower than the second, and it will be placed back in front.
  4. Replies
    9
    Views
    325

    Re: Sorting problem

    My testing code is

    public class A3Q2
    {
    public static void main (String [] args)
    {
    String input = "";
    int data;
    DoublyLinkedList testList = new DoublyLinkedList();
    try
  5. Replies
    9
    Views
    325

    Sorting problem

    I'm attempting to sort a DoublyLinkedList, but my code is producing an error in the cmd box. My problem is, I don't know what's wrong because it just prints line after line of...
  6. Replies
    4
    Views
    3,325

    Re: Insertion Sort on a Doubly Linked List

    It simply says "Insertion Sort", I got the idea that you needed two lists from my misunderstanding of the Wikipedia article on Insertion Sorts. My new Code is:

    public void sort ()
    {
    if (size...
  7. Replies
    4
    Views
    3,325

    Re: Insertion Sort on a Doubly Linked List

    Ok, apparently I wildly misunderstood, I thought an insertion sort meant creating a new sorted list. I'm going to try and re-write it without making a new list.
  8. Replies
    4
    Views
    3,325

    Insertion Sort on a Doubly Linked List

    I'm having some trouble on a problem. What is supposed to happen is that a list of integers is read into an unsorted Doubly Linked List, and then sorted using an insertion sort. The code I have for...
Results 1 to 8 of 8