谁能给个字符串中字符全排列的算法

2025-04-12 02:00:46
推荐回答(1个)
回答1:

:import java.util.Scanner;public class Demo001 {public static void main(String[] args) { String str = ""; Scanner scan = new Scanner(System.in); str = scan.nextLine(); permutation(str.toCharArray(), 0); } public static void per