|
|
back to boardIs it topological sort? I did get AC on this. I used queue and in_degree array. First pushed zero in_degree elements in queue and then visited neighbour for each element in front , reduced in_degree of neighbours by 1 each time to indicate one parent has reduced. Edited by author 29.04.2020 12:08 |
|
|