I have not solved this problem yet.
I just have some doubts.
If we use topological sort to solve this problem, does it mean that any sequence in the
seqs must not have loops?
seq = [[1,2,1]] org = [1,2,1]
What is the expected result? True? But the accepted code gives False.
Does it imply that the
seqs must not contain duplicated numbers?
Would it be better to clearly say that the permutation does not contain duplicated elements? @1337c0d3r