ProblemGiven a square grid of characters in the range ascii[a-z], rearrange elements of each row alphabetically, ascending. Determine if the columns are also in ascending alphabetical order, top to bottom. Return YES if they are or NO if they are not. Examplegrid = ['abc', 'ade', 'efg']The grid is illustrated below.a b ca d ee f gThe rows are already in alphabetical order. The columns a a e, b d..