Snippets tagged binary search

  • Binary search

    Simple binary search of an array. Tests the array at the middle and divides the search space by half each time it looks for the target item. Returns the target item and how many iterations it took to get there

    3 people like this

    Posted: 11 years ago by devshorts

  • Binary search on sorted arrays

    Performs binary search on sorted arrays. Both ascending and descending-ordered arrays are supported. Pass a reverse comparer to the tryBinarySearchWith function to search on descending-ordered arrays.

    2 people like this

    Posted: 4 years ago by Bang Jun-young