Algorithm for computing the moduli space of pointed Gorenstein curves with Weierstrass gap sequence \(1,2,\ldots,g-2,\lambda,2g-3\) Closed-form solutions to irreducible Newton-Puiseux equations by Lagrange inversion formula and diagonalization on polynomial sequences of binomial-type 