DatabricksSoftware Engineer · OnsiteCodemia practiceValidate grid sorted
Given a 2D grid of integers, write a function to determine if each row and each column of the grid is sorted in non-decreasing order. The function should return a boolean value: true if the grid is sorted, and false otherwise. The input will be a 2D array, and the output will be a single boolean value.