Search:

Type: Posts; User: AWol

Search: Search took 0.23 seconds.

  1. Replies
    5
    Views
    150

    Re: Problem with a binary search

    I'm sorry I'm just not following... Like I said this class will explain what you're supposed to do, give a short example (in which I'm finding out the code is not even valid) and say "ok now do...
  2. Replies
    5
    Views
    150

    Re: Problem with a binary search

    Thank You!

    Another error is popping up now, saying that this line:



    if(a[mid].compareTo(x) < 0)


    is not good. The error says "int cannot be dereferenced".
  3. Replies
    5
    Views
    150

    Problem with a binary search

    I am attempting to write basic code for a binary search. Here is the code I have:




    public class BinarySearch
    {
    public static final int NOT_FOUND = -1;
    public static int...
Results 1 to 3 of 3