摘要:
1.字符串原地翻转,"abc"->"cba":int str_reverse(string &str,int first,int last){ if(first>last) return -1;//对比失败 else if(first==last) return 0;//对比完成 if(str.length()"tom is cat":string str_word_reverse(string str){ int i=0,j=0,p=0,k=0,len=str.length(); string str_tmp(l 阅读全文