You are viewing a single comment's thread. Return to all comments →
def cavityMap(grid): for i in range(1,len(grid)-1): for j in range(1,len(grid)-1): if(grid[i][j] > grid[i][j-1] and grid[i][j] > grid[i][j+1]): if(grid[i][j] > grid[i-1][j] and grid[i][j] > grid[i+1][j]): x= list(grid[i]) x[j] = "X" grid[i] = "".join(x) return grid
Seems like cookies are disabled on this browser, please enable them to open this website
Cavity Map
You are viewing a single comment's thread. Return to all comments →