2013年03月08日11:00 カテゴリアルゴリズム百選Math Algorithm - 配列の冪集合、順列、組み合わせを再帰なしで作る C言語による最新アルゴリズム事典 奥村晴彦 ちょっと必要に迫られたので、JavaScript用のやつを作りました。 dankogai/js-combinatorics ・ GitHub こんな感じで使います。 var a = ['js', 'pl', 'py', 'rb'], c, e; p( '/* power set */' ); c = Combinatorics.power(a); p( 0 + c ); while (e = c.next()) p(JSON.stringify(e)); p( '/* combination */' ); c = Combinatorics.combination(a, 3); p( 0 + c ); p(J
![Algorithm - 配列の冪集合、順列、組み合わせを再帰なしで作る : 404 Blog Not Found](https://cdn-ak-scissors.b.st-hatena.com/image/square/da78a05937633f7a2b4b2219826151c370cd607b/height=288;version=1;width=512/https%3A%2F%2Fparts.blog.livedoor.jp%2Fimg%2Fusr%2Fcmn%2Fogp_image%2Flivedoor.png)