I'm working for this in C++ :)
Can I implement this in python? @AdiChat
Sure @aakash-sopho Go ahead 馃憤
I'm working on this in Java
PR #426 .. implementation in python
PR #428 Implemented in C++
PR #431 Implemented in Java
my approach deals with checking the cycle using lightweight unionfind set data structure
although @shashwatjolly has already done great work,but his and mine appraoches are quite different.