摘要: 由于排列的问题能够很好的考查对递归的掌握程度,并且实现也非常的简单,因此经常会出现在面试之中。下面就是某著名互联网公司的一道关于排列的面试题:题目:输入一个字符串S和一个整数N,其中S中的各个字符均不相等,并且N小于等于S的长度,请输出由S中字符组成的长度为N的所有的排列。如:字符串是"abc", ... 阅读全文
posted @ 2013-02-06 12:50 小尼人00 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 字符串的全排列,递归交换#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #in... 阅读全文
posted @ 2013-02-06 11:15 小尼人00 阅读(271) 评论(0) 推荐(0) 编辑