【发布时间】:2016-04-01 15:36:41
【问题描述】:
什么抽象数据类型 (ADT) 用于实现 steinhaus-johnson-trotter algorithm 以在 Python 中生成对象排列?
我特别担心在数据的任何位置插入的复杂性成本:
1
12
21
123
132
312
来自llist 模块的双向链表是一个不错的选择吗?
【问题讨论】:
标签: algorithm python-2.7 permutation doubly-linked-list