算法导论Problems 2-4: Inversions
算法导论上Problems 2-4是一道求逆序数个数的问题,原题目是这样的: Let A[1 ‥ n] be an array of n distinct numbers. If i A[j], then the pair (i, j) is called an inversion of A. List the five inversions of the array 〈2, 3, 8, 6, 1〉. What array with elements from
原创
2011-02-14 20:06:00 ·
1081 阅读 ·
0 评论