  We describe all Mathieu-Zhao spaces of $k[x_1,\cdots,x_n]$ ($k$ is an
algebraically closed field of characteristic zero) which contains an ideal of
finite codimension. Furthermore we give an algorithm to decide if a subspace of
the form $I+kv_1+\cdots+kv_r$ is a Mathieu-Zhao space, in case the ideal $I$
has finite codimension.
