Top "Binary-search" questions

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

How to perform a binary search on IList<T>?

Simple question - given an IList<T> how do you perform a binary search without writing the method …

.net generics list interface binary-search
Maximum subarray sum modulo M

Most of us are familiar with the maximum sum subarray problem. I came across a variant of this problem which …

algorithm binary-search modulo kadanes-algorithm
Binary search in a sorted (memory-mapped ?) file in Java

I am struggling to port a Perl program to Java, and learning Java as I go. A central component of …

java nio large-files binary-search memory-mapping
Java Dictionary Searcher

I am trying to implement a program that will take a users input, split that string into tokens, and then …

java string hashtable binary-search
Swift: Binary search for standard array?

I have a sorted array and want to do binary search on it. So I'm asking if something is already …

arrays swift types binary-search
binary search middle value calculation

The following is the pseudocode I got from a TopCoder tutorial about binary search binary_search(A, target): lo = 1, hi = …

binary-search
What are the pitfalls in implementing binary search?

Binary search is harder to implement than it looks. "Although the basic idea of binary search is comparatively straightforward, the …

algorithm binary-search
find an element in a sorted matrix

Problem: Given a matrix in which each row and each column is sorted, write a method to find an element …

java arrays algorithm binary-search
Parallel Binary Search

I'm just starting to learn about parallel programming, and I'm looking at binary search. This can't really be optimized by …

parallel-processing binary-search
Can LINQ use binary search when the collection is ordered?

Can I somehow "instruct" LINQ to use binary search when the collection that I'm trying to search is ordered. I'm …

c# linq collections binary-search