krishna_7's blog

By krishna_7, history, 6 years ago, In English

So I have been trying a DFS problem. But it is giving me a runtime error on test 9. However, I am not able to understand why I am getting runtime error. It has been two hours now. Someone please help me.

Edit: This is my code.

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
6 years ago, # |
  Vote: I like it +1 Vote: I do not like it

The cmp for sort() is required to define "less then".

If cmp(a, a) returns true, which violates the requirment, the behavior is undefined.