摘要:
class Solution { public: int lengthOfLongestSubstring(string s) { unordered_set<char> hash; //哈希表判断重复字符 int n = s.size(); int rk = -1 , ans = 0; for(i 阅读全文
摘要:
class Solution { /*三数之和每组数存在唯一得到答案1.数组排序2.双指针解法a b c先用一重循环枚举A再用双指针枚举b cint sum = target如果sum比target大则让sum变小则c向左反之b向右b指向头指针 c指向尾指针 先要初始化一个answer 否则结果会停 阅读全文