Top "Binary-search" questions

Binary search is an efficient algorithm for finding an element in a sorted array.

First occurrence in a binary search

I'm tinkering with some code and I realized something I never knew. A normal binary search will return a random …

java algorithm search binary binary-search
Binary Search to Compute Square root (Java)

I need help writing a program that uses binary search to recursively compute a square root (rounded down to the …

java recursion binary-search square-root
C# lambda expressions and IComparer

I am using lambda expressions to sort and search an array in C#. I don't want to implement the IComparer …

c# lambda binary-search icomparer
Get the largest key in a dictionary

I have a dictionary with keys that are ints. I would like to get the largest key. I don't keep …

c# dictionary search key binary-search
Is there a built-in binary-search In Ruby?

I am looking for a built-in Ruby method that has the same functionality as index but uses a binary search …

ruby binary-search
<algorithm> function for finding last item less-than-or-equal to, like lower_bound

Is there a function in that uses binary search, like lower_bound but that returns the last item less-than-or-equal-to according …

c++ binary-search lower-bound
Difference between basic binary search for upper bound and lower bound?

In the article http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=binarySearch, the author discusses binary …

c++ binary-search lower-bound upperbound
Java equivalent of c++ equal_range (or lower_bound & upper_bound)

I have a List of object sorted and I want to find the first occurrence and the last occurrence of …

java binary-search lower-bound upperbound
What is the performance impact of non-unique indexes in pandas?

From the pandas documentation, I've gathered that unique-valued indices make certain operations efficient, and that non-unique indices are occasionally tolerated. …

python performance indexing pandas binary-search
Difference between binary search and binary search tree?

What is the difference between binary search and binary search tree? Are they the same? Reading the internet it seems …

algorithm data-structures binary-search-tree binary-search