Algorytm Kadane 2D