LinkedInSoftware Engineer · Phone ScreenCodemia practiceTopological Sort on grid
Given a grid represented as a 2D array where each cell contains a unique integer, perform a topological sort to determine a valid ordering of the cells based on their values. The output should be a list of integers representing the sorted order, ensuring that for any two cells, if one cell's value is less than another's, it appears before the latter in the output list.
Medium
Coding & Algorithms