Question: 
Write a function to find out the maximum sum such that no two chosen numbers are adjacent for the given rectangular grid of dimension 2 x n.


Model's Code:
def max_sum_rectangular_grid(grid, n):
    if n == 0:
        return 0
    if n == 1:
        return max(grid[0][0], grid[1][0])

    prev1 = max(grid[0][0], grid[1][0])
    prev2 = 0

    for i in range(1, n):
        current = max(prev1, prev2 + max(grid[0][i], grid[1][i]))
        prev2 = prev1
        prev1 = current

    return prev1



Sample Correct Code:
def max_sum_rectangular_grid(grid, n) : 
	incl = max(grid[0][0], grid[1][0]) 
	excl = 0
	for i in range(1, n) : 
		excl_new = max(excl, incl) 
		incl = excl + max(grid[0][i], grid[1][i]) 
		excl = excl_new 
	return max(excl, incl)


Asserts:
assert max_sum_rectangular_grid([ [1, 4, 5], [2, 0, 0 ] ], 3) == 7
assert max_sum_rectangular_grid([ [ 1, 2, 3, 4, 5], [ 6, 7, 8, 9, 10] ], 5) == 24
assert max_sum_rectangular_grid([ [7, 9, 11, 15, 19], [21, 25, 28, 31, 32] ], 5) == 81


Tests:
Test 1 of 3: PASS
Test 2 of 3: PASS
Test 3 of 3: PASS

Test 314 of 974: 225/314 (71.656050955414%): success