输入“a,b”的时候测试结果不正确,如下:
"a"",""c"
"a""""ac""""a""""c""ca""c"
"a""""ac""a""""""c""ac""""a""""""c""a""""ac""a""""""c""ca""c""""ca""""ca""c"
正确测试结果应为:
"a" "," "c"
"a," "ac" ",a" ",c" "ca" "c,"
"a,c" "ac," ",ac" ",ca" "ca," "c,a"
可以看看这个帖子:
编程列出一个字符串的全字符组合情况"的新解法
http://bbs.itheima.com/thread-203214-1-1.html
(出处: 黑马程序员IT技术论坛)
|