Algorithm to efficiently find the largest contiguous rectangle of target values in a large 2d matrix of boolean values