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

Автор vohrab1896, история, 4 года назад, По-английски

Hi all

I am getting WA in SPOJ-TOPOSORT. I solved it using Kahn's Algorithm but getting WA. To get smallest value on second place I am picking up smallest value from the child nodes of the node present at the front of queue and then comparing it's value to other value present in the front of queue. This is the link- [https://ideone.com/Yur2cr]. I have given a lot of time to find the wrong test case but failed. If anyone is able to solve this then please let me know.

Thanks

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