"one two three four"와 같은 문장이 주어지면 순서 순열에서 단어 목록을 어떻게 반복 할 수 있습니까?주어진 문자열의 순서 순열 생성
이 내가 공간 구분 기호를 사용하여 단어를 분할했지만 말은 현재 주문에 보관 모든 조합을 반복하는 방법을 작동하지 않을 수
"one"
"one two"
"one two three"
"one two three four"
"two"
"two three"
"two three four"
"three"
"three four"
"four"
달성하기 위해 노력하고있어입니다. 사전에
List<String> product_words = new ArrayList<String>(Arrays.asList(productname.split(" ")));
for (int x = 0; x < product_words.size(); x++) {
//stuck here
}
감사
숙제의 냄새. –
@ NathanielWaggoner 및 ???? – Simon
나는 그것을 의심하므로 52 살입니다! – Mark