Search:

Type: Posts; User: husain2213

Search: Search took 0.09 seconds.

  1. Replies
    7
    Views
    1,971

    Re: quicksort and bubblesort comparison

    Thanks Norm. This code is full of mistakes, i'm finding out, but i've been fixing them one by one.
    I think I fixed the counts, but I broke some other stuff on the way :confused:
    Quick sort is now...
  2. Replies
    7
    Views
    1,971

    Re: quicksort and bubblesort comparison

    no, its not completely solved yet! here is what's wrong:

    1- quick sort still takes forever for larger array sizes (I don't think it is supposed to).
    2- comparison count returned by quicksort is...
  3. Replies
    7
    Views
    1,971

    Re: quicksort and bubblesort comparison

    I think there was a problem in my swap() method, but its fixed now and the arrays are sorted.
    There are no infinite loops, but quicksort is.. well, not quick. It takes forever and doesn't return a...
  4. Replies
    7
    Views
    1,971

    quicksort and bubblesort comparison

    Hello everyone,
    I'm having trouble with my assignment and need you're help!
    I'm supposed to write the code for bubblesort and quicksort and test them under different array sizes while recording the...
  5. Replies
    4
    Views
    1,346

    Re: Binary Tree Search[HELP]

    I understand what you guys are saying, its just that putting it in code is is a bit tough for me :confused:
    I have to search in preorder using recursion to compare the strings, and if a match is...
  6. Replies
    4
    Views
    1,346

    Re: Binary Tree Search[HELP]

    Sorry, but this didn't really help. I understand where is my error, I just have no idea how to fix it. I tried making it look like the preorderPrint class, but it doesn't work because I have to...
  7. Replies
    4
    Views
    1,346

    Binary Tree Search[HELP]

    hello everyone!
    I'm have created a binary tree program where the tree is balanced(but not sorted). The Tree hold unique strings in each nodes. if the user enters a non unique string, the node...
  8. Replies
    9
    Views
    1,108

    [SOLVED] Re: Please Help (Queues)

    Thanks a lot,, its working now :-bd just needs some tweaking
    really appreciate the help :o
  9. Replies
    9
    Views
    1,108

    [SOLVED] Re: Please Help (Queues)

    customerQueue is null: false
    customerQueue.peek() is null: true
    Exception in thread "main" java.lang.NullPointerException
    at CustomerQueue.main(CustomerQueue.java:30)

    is this happening because...
  10. Replies
    9
    Views
    1,108

    [SOLVED] Re: Please Help (Queues)

    Exception in thread "main" java.lang.NullPointerException
    at CustomerQueue.main(CustomerQueue.java:28)

    that's the exact exception. it points to this line:
    customerQueue.peek().minutePassed();
  11. Replies
    9
    Views
    1,108

    [SOLVED] Re: Please Help (Queues)

    oops!
    thanks for that. It compiles now but i get an exception when running it. could you take a look at the new code?


    import java.util.Queue;
    import java.util.LinkedList;
    import...
  12. Replies
    9
    Views
    1,108

    [SOLVED] Please Help (Queues)

    Hi!
    so i'm trying to make a program with a customer class that keeps how many minutes each customer needs to be served. The driver class CustomerQueue is a queue of all customers that haven't been...
Results 1 to 12 of 12