摘要: 1 #!/usr/bin/python 2 #coding:utf-8 3 def next_permutation(A): 4 ''' 5 input: array of a permutation of n numbers 6 output: the next permutation 7 Algorithm: dicttionary order 8 ''' 9 #print(A)10 n = len(A)11 last = n - 112 i... 阅读全文
posted @ 2011-10-01 15:29 Let it be! 阅读(1709) 评论(0) 推荐(0) 编辑