Search a rectangular, sorted (column-wise and row-wise) matrix.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README
matrix2d.go
matrix2d_test.go

README

Search a rectangular, sorted (column-wise and row-wise) matrix.

Returns (Point{-1, -1}, false) if no key is found.

All code branches are covered by matrix2d_test.go.

Uses the algorithm described by Craig Gidney: http://twistedoakstudios.com/blog/Post5365_searching-a-sorted-matrix-faster