我试图找到数组(all distinct)
的更大排列。我们假设 - 我们有一个数组{1,2,3}
,然后它的排列为{1,2,3}, {1,3,2}, {2,1,3}, {2,3,1},{3,1,2},{3,2,1}
。
我想知道哪个permutation
比另一个更大,怎么样?
如果可能,请使用大小为4或更大的数组来解释。
例如:
EX1。 m = {1,2,3}和n = {2,3,1}然后,我想, n> m因为case 1:<br> I consider the first difference where the n(0)>m(0) and hence permutations n>m . <br><br> case 2: <br> n(0) > m(0) and n(1) > m(1) though n(2) < m(2).Hence, n>m. <br> which case shall I consider?
EX2:
p = [2,3,1]和q = [1,3,2],p > q because p(0) > q(0) & p(1) = q(1) even though p(2) < q(2). Am I correct? <br> Take examples to explain all this and think as if you are explaining a child.