大家好,想了好多天, 4天拉. 没思路, 快崩溃了.
INPUT-> 集合里面的子集合数目并不知道(以下例子是3个)
{ {"hello", "world"}, {"how", "you", "going"}, {"man", "woman"}}
每个子集合里面也许有4000个字, 所以要求答案效率很高.
要求输出所有的组合(2x3x2=12 combinations) 应该有12个可能性.
hello how man
hello how woman
hello you man
hell you woman
...
请给出代码. 因为我递推 基本不懂, 多谢.
请给出 非递推 代码. 感觉也许效率更高.
最好是C# 的代码.
答案可以发到这, 如果不方便的话, 也可以发我邮箱 rc2004@gmail.com
万分感谢.