0
我有以下數組:在php中沒有重複的順序組合?
Array(「one」,「two」,「three」,「four」);
我需要一個函數來輸出數組元素的所有有序組合,而不需要重複。輸出應該
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
等等......
難道你們有人已經實施這種alghoritm的?
您是否嘗試過的東西?這看起來很簡單。 – Passerby
我已經在網上搜索了各種解決方案,但是我發現的所有解決方案都有/無重複,不適合我的需要 – Scalax