We investigate seven Monte Carlo algorithms - four old and three new - for constructing merger histories of dark matter haloes, using the extended Press-Schechter (EPS) formalism based on both the spherical and ellipsoidal collapse models. We compare, side-by-side, the algorithms' abilities at reproducing the analytic EPS conditional (or progenitor) mass function over a broad range of mass and redshift (z = 0 to 15). Among the four old algorithms (those by Lacey & Cole, Kauffmann & White, Somerville & Kolatt and Cole et al.), we find that only the method of Kauffmann & White produces a progenitor mass function that is consistent with the EPS prediction for all look-back redshifts. The origins of the discrepancies in the other three algorithms are discussed. Our three new algorithms are designed to generate the correct progenitor mass function at each time-step. We show that this is a necessary and sufficient condition for consistency with EPS at any look-back time. We illustrate the differences between the three new algorithms and the method of Kauffmann & White one by investigating two other conditional statistics: the mass function of the i th most massive progenitors and the mass function for descendants with Np progenitors.