我有以下数组:
数组(“一”、“二”、“三”、“四”);
我需要一个函数来输出数组元素的所有有序组合而不重复。输出应该是
one
one two
one two three
one two three four
two
two three
two three four
three
three four
four
输出不应包括:
one one
one two four
two one three
four two three
等等 ...
你们中有人已经实施过这种算法吗?