Let's say I remember how to write and use UnionFind data structure and I have a general idea of how it works. I can solve UnionFind question but then when I try to go through the example, it takes lots of time and I make lots of mistakes. Do you have some simple strategy for testuing UnionFind based solutions? What is your experience?