Блог пользователя krishna_7

Автор krishna_7, история, 8 лет назад, По-английски

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.

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

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

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