Numerical solution of moving boundary problems in diffusion processes with attractive and repulsive interactions