public void TestAllPermutations() { var r = Permutation.AllPermutations_S1(new[] { 1, 2, 3, 4 }); Assert.AreEqual(r.Count, 4 * 3 * 2); r = Permutation.AllPermutations_S2(new[] { 1, 2, 3, 4, 5 }); Assert.AreEqual(r.Count, 5 * 4 * 3 * 2); }