0
A
回答
2
在set中插入需要的字母並調用findSubset。
Set findSubsets(Set A)
{
if A is the empty set
return the empty set
// The first element of our set is A[0]
// (A - A[0] is the set A without the first element)
Set B := findSubsets(A - A[0])
// Set B is now all the subsets of A without the first element
// We now find all the subsets of A containing the first element by finding
// tacking on the first element to the sets inside B
Set C = {}
For each set D in B
add {A[0], D} to C
return B added to C
}
0
相關問題
- 1. 如何查找給定字符串的排列順序?
- 2. 如何查找字符串的所有排列?
- 3. 查找字符串的所有列表排列在Python
- 4. 如何查找並排列字符串列表中的所有前綴?
- 5. 查找和排序字符串
- 6. 如何排序的字符串列表?
- 7. 如何查找分隔字符串內的數字字符串
- 8. 如何查找列表中的列表的匹配字符串?
- 9. 如何找到字符串的排列? python
- 10. 查找某個字符串的所有排列不變
- 11. Math - 查找兩個字符串之間的排列數
- 12. 排列字符串
- 13. 字符串排列
- 14. 字符串排列
- 15. 查找字符串中的字符串
- 16. 查找字符串中的字符串
- 17. 查找字符串中的字符串
- 18. 查找字符串中的字符串列表中的蟒蛇
- 19. 查找給定的字符串值列表中的字符串
- 20. 如何查找字符串的句點
- 21. 如何在PHP中查找字符串內的字符串?
- 22. 如何查找字符串是否包含任何字符串列表項?
- 23. 從字符串列表中查找任何字符的索引
- 24. 查找列表中的字符串
- 25. 查找列表中的字符串 - Erlang
- 26. 查找列表中的字符串
- 27. 查找大字符串的子序列
- 28. 如何檢查字符串中的字符是否按字母順序排列
- 29. 如何排序字符串列表?
- 30. 如何排列兩個字符串?
這是功課? – 2011-03-10 11:33:10
這不是排列,這是所有可能的子集... – Vladimir 2011-03-10 11:33:51
哪種編程語言? – 2011-03-10 11:34:04