You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every element belongs to some diagonal, and it's previous element (if it exists) is it's top-left neighbor. We will check from 0th row and col and last -1 row and col and check the cells to their bottom right- row+1 and col+1