update hasPathSum.cpp