solution to BITSWAPS in python

I have been trying to understand this submission code. The code actually looks clean and efficient, also it does not use disjoint set union. (maybe I am just making an excuse to not learn it). I have been trying really hard to understand how the code works but I am not able to. Can anyone please help me?

1 Like