add a toString() method
fix a bug related to deunions after resizes

* also some misc refactorings
convert findRoot from an iterative to a recursive algorithm
test the DiffArray, not the original