Details
Description
SparseMatrix use binarySearch to find index.
binarySearch returns index of the search key, if it is contained in the array within the specified range; otherwise, (-(insertion point) - 1).
On the other hand, update method only compare the returned index with -1 to decide whether it is found or not.