Algorithm for computing the moduli space of pointed Gorenstein curves with Weierstrass gap sequence \(1,2,\ldots,g-2,\lambda,2g-3\) Effective divisors on \(\overline{\mathcal M}_g\), curves on \(K3\) surfaces, and the slope conjecture 