finished removeNodeOutsideRange and areTreesIsomorphic