摘要:
1 #include 2 using namespace std; 3 4 5 //判断字符串2中的字符是否全部在字符串1中出现 6 bool same(char*str1, char*str2) 7 { 8 int hashtable_str1[256] = { 0 }; 9 int hashtable_str2[256] = { 0 }; 10 ... 阅读全文
摘要:
function_1: 1、将第一个字符串移到末尾; 2、执行上面的步骤n次,就可以将前n个字符移到末尾 源码: function_2: 方法:将前n个字符移到末尾,先将前n字符旋转,再将n后的字符旋转,最后旋转整个字符串 源码: //将字符串的前n个字符移到末尾去#include <iostrea 阅读全文