> 4 5 1 2 3 6 7 8 << the list itself > 1 2 1 2 3 4 5 6 << ordering numbers for forward direction > 2 1 6 5 4 3 2 1 << ordering numbers for backward direction > === > 3 3 7 7 7 7 7 7 << sums of the pairs of ord. numbers Oops! Sorry for miscounting in backward direction. Should be (anyway the answer stays the same):
4 5 1 2 3 6 7 8 << the list itself 1 2 1 2 3 4 5 6 << ordering numbers for forward direction 5 4 6 5 4 3 2 1 << ordering numbers for backward direction === 6 6 7 7 7 7 7 7 << sums of the pairs of ord. numbers -- http://mail.python.org/mailman/listinfo/python-list