摘要:
思路 二分查找变种 // 旋转数组的最小数 int getMinNum(vector<int> &nums){ int left = 0; int right = nums.size() -1; while(left <= right){ int mid = left + (right - left 阅读全文
摘要:
// 遍历字符串,使用set集合记录走过的字符// 字符串不含重复字符的最长子串 int longChirldStr(string s){ set<char> tmpSet; int ret = 0; int right = 0; int size = s.length(); if(size ==0 阅读全文