Update Solution.cc

fixed a bug in hasCircle()