We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
coding-interviews/src/Test28.java
tmp = chars[begin]; chars[begin] = chars[i]; chars[i] = tmp; // 处理下一个位置 permutation(chars, begin + 1);
//permutation(chars, begin + 1);后添加代码: tmp = chars[i]; chars[i] = chars[begin]; chars[begin] = tmp;
The text was updated successfully, but these errors were encountered:
是的,应该要做回溯,这样才能打印出正确结果; 另外,没有考虑字符重复的问题,比如“abb”,那么排列应该改成3种结果 建议加个set做一下重复过滤
Sorry, something went wrong.
No branches or pull requests
coding-interviews/src/Test28.java
The text was updated successfully, but these errors were encountered: