【发布时间】:2010-08-06 17:00:04
【问题描述】:
可能的重复:
Display possible combinations of string
algorithm that will take numbers or words and find all possible combinations
如果我有 3 个字符串,例如:
"abc def xyz"
我想通过重新排列这些字符串来找到我可以生成的最大组合数,例如:
- abc xyz def
- def xyz abc
- xyz abc def
等等。计算这个的公式/算法是什么?
【问题讨论】:
-
Display possible combinations of string 和 a couple others 的可能重复项,例如 stackoverflow.com/questions/1256117/… - 我记得还有一些,但现在懒得找了。
-
字符串可以重复吗?像“abc abc def”?
-
@Gordon 这不是那个的副本。他只是在询问排列的数量。
-
@Artefacto。如果 OP 只要求总数的公式,那么它就是题外话!无论哪种情况,这个问题都应该结束。
-
@Moron 这并不是真正的题外话,因为他问他如何用特定的编程语言 (PHP) 计算数字,即如何实现给出该数字的算法。询问
f: x->x在a和b之间的积分是多少和要求一种算法来确定所述积分是不同的。