摘要: 题目链接: https://leetcode-cn.com/problems/lemonade-change/ 题目描述: 题解: class Solution { public: bool lemonadeChange(vector<int>& bills) { unordered_map<int 阅读全文
posted @ 2021-06-17 11:26 张宵 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 题目链接: https://leetcode-cn.com/problems/reverse-string-ii/ 题目描述: 题解: 要点:遍历的步长为2 * k。当需要固定规律一段一段去处理字符串的时候,要想想在在for循环的表达式上做做文章。 class Solution { public: 阅读全文
posted @ 2021-06-17 10:50 张宵 阅读(29) 评论(0) 推荐(0) 编辑