As an ex-programmer of too many years to count (and a good one as they said), I have checked the algorithm and am able to vouch for its completeness…