## CSES – Cycle Finding, my algorithm finds cycle if it has any negative weight, but it is not accepted by CSES

https://cses.fi/problemset/task/1197

Cycle Finding,

my algorithm prints cycle if it has any negative weight, but jury is not accepting.

they suggested to use bellman ford algorithm but my dfs also working fine.

Question:

You are given a di…