![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
Anki Stark
这个作者很懒,什么都没留下…
展开
-
leetcode49.异位词分组
想偷懒利用上次242有效的字母异位词的函数class Solution {public: bool isAnagram(string s, string t) { int ls = s.length(), i, j; int lt = t.length(); if (ls != lt)return false; vector<int>record(27, 0); for (i = 0; i < ls; i++) { record[s[i] - 'a']+原创 2020-12-15 19:27:15 · 78 阅读 · 1 评论 -
leetcode649.Dota2参议院
有点循环队列的意思(看题解写的)class Solution {public: string predictPartyVictory(string senate) { int l=senate.length(); queue<int>R; queue<int>D; int i=0; while(i<l) { if(senate[i]=='R')原创 2020-12-11 19:38:55 · 100 阅读 · 0 评论