N^2 Solution for 4Sum & refine validate binary tree