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

    2 people like this

    Posted: 6 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.

    1 people like this

    Posted: 3 months ago by Bang Jun-young