Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountLargerAndSmallerBrute ¶
CountLargerAndSmallerBrute computes the number of elements of M smaller than M[i1, j1] and larger than M[i2, j2]. Runs in O(M*N) time. Scans the entire matrix.
func CountLargerAndSmallerEfficient ¶
CountLargerAndSmallerEfficient computes the number of elements of M smaller than M[i1, j1] and larger than M[i2, j2]. Runs in O(Answer). Only examines the number of elements in the answer.
Types ¶
Click to show internal directories.
Click to hide internal directories.