Search:

Type: Posts; User: dx8292

Search: Search took 0.11 seconds.

  1. Thread: Sorting/Search

    by dx8292
    Replies
    7
    Views
    2,148

    Re: Sorting/Search

    (1+11)/2=6
    (1+5)/2=3
    (4+5)/2=4.5 round to 5

    I got three.
  2. Thread: Sorting/Search

    by dx8292
    Replies
    7
    Views
    2,148

    Re: Sorting/Search

    What do mean? I want to see how many comparisons it would take to find 45. The first comparison would be to 45 and the midpoint number (58)
    Then the rest of the comparisons would be to each element...
  3. Thread: Sorting/Search

    by dx8292
    Replies
    7
    Views
    2,148

    Re: Sorting/Search

    The thing Binary Search I wasn't really sure was when it checks the middle number and if it's not value that was being searched for, does it start searching in reverse order if the first half needs...
  4. Thread: Sorting/Search

    by dx8292
    Replies
    7
    Views
    2,148

    Sorting/Search

    Wanted to check if I was doing this correctly.

    Binary Search: Find number of comparisons needed

    5 11 18 40 45 58 62 75 88 95 100

    A. 45 --> 3 needed
    B. 96 --> 3 needed
Results 1 to 4 of 4