生成整数数组的所有分区

时间:2014-12-05 21:55:55

标签: c++ algorithm subset brute-force data-partitioning

Bell编号计算一组的分区数。我想生成整数数组的所有可能分区。

例如,我有以下整数数组:{1, 2, 3, 4}。然后有15个分区。

all partitions

有没有简单的方法来完成我的任务?或者什么是常见的算法?

0 个答案:

没有答案
相关问题