Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.

Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).

Subcategories

Smarking Algorithm Contest 2

@mmangelmm Then, it failed on

X

"The org sequence is a permutation of the integers from 1 to n"

Would there be duplicates for integers from 1 to n?

M

@dongll The problem said "org sequence is a permutation of the integers from 1 to n" which kind of indicate they are unique

S

great idea. fresh eyes can do wonders!

No one has replied

@Evilgit overflow

L

@SJD_Dream Sigh....that's not fun....

I

@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"

W

@Phillf wrong answer

R

@Aimar88 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.

nice solution

Disabled Categories are greyed out

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.