Smarking Algorithm Contest 2
Then, it failed on
"The org sequence is a permutation of the integers from 1 to n"
Would there be duplicates for integers from 1 to n?
@dongll The problem said "org sequence is a permutation of the integers from 1 to n" which kind of indicate they are unique
great idea. fresh eyes can do wonders!
No one has replied
@SJD_Dream Sigh....that's not fun....
@Xing_ What about [6,2,1, 5,2] for [[6,2,1], [2, 1, 5, 2]] shouldn't it be a "true"? While the solution ouputs "false"
@Phillf wrong answer
It is used to initiate a <k,v> pair in incoming_nodes for arr[i].
Otherwise, cur = [k for k in incoming_nodes if incoming_nodes[k] == 0] this line won't work.
Disabled Categories are greyed out
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.