原创 添加最少的字符使字符串整體都是迴文字符串

#include <iostream> #include <string> #include <vector> #include <cmath> using namespace std; vector<vector<int> >

原创 將整數字符串轉化爲整數值

#include <iostream> #include <string> #include <climits> using namespace std; bool isValid(string& str) { if(st

原创 公式字符串求值

#include <iostream> #include <string> #include <vector> #include <deque> #include <sstream> using namespace std; v

原创 0左邊必有1的二進制字符串數量

#include <iostream> #include <vector> using namespace std; int process(int i, int N) { if(i == N) retur

原创 字符串中數字子串的求和

#include <iostream> #include <string> using namespace std; int numSum(string str) { int res = 0; int num =

原创 字符串的統計字符串

#include <iostream> #include <string> using namespace std; string getCountString(string& str) { if(str.size() =

原创 去掉字符串中連續出現K個0的子串

#include <iostream> #include <string> using namespace std; string removeK(string str, int k) { if(k < 1)

原创 判斷倆個字符串是否互爲旋轉詞

#include <iostream> #include <string> using namespace std; bool isRotation(string a, string b) { if(a.size() !=

原创 字符串的調整與替換

#include <iostream> #include <string> #include <cstring> using namespace std; void replacestr(char* str) { if(s

原创 替換字符串中連續出現的指定字符串

#include <iostream> #include <string> #include <cstring> using namespace std; void clearstr(string& str, int end, i

原创 拼接字符串所產生的字典序最小

#include <iostream> #include <string> #include <algorithm> #include <vector> using namespace std; bool compare(stri

原创 數組中倆個字符串的最小距離

#include <iostream> #include <string> #include <vector> #include <climits> #include <map> #include <cmath> using na

原创 翻轉字符串

#include <iostream> #include <string> #include <cmath> using namespace std; void rever(string& str, int start, int

原创 判斷字符串中是否所有的字符都只出現過一次

#include <iostream> #include <string> #include <vector> using namespace std; bool isUnique1(string str) { vecto

原创 計算機網絡面試題(二)

11.流量控制與擁塞控制(重要) 流量控制與擁塞控制 12.滑動窗口協議 滑動窗口協議 13.採用滑動窗口會有什麼問題 1.死鎖:B向A發送了零窗口報文,之後B有了接受緩存,於是將自己的窗口發給A,可是這個報文段丟失了,A一直等待B的