08 2021 档案

摘要:分发糖果(135)的成环版本,据说是2021.8.21的网易笔试题 https://leetcode-cn.com/problems/candy/solution/candy-cong-zuo-zhi-you-cong-you-zhi-zuo-qu-zui-da-/1092916 阅读全文
posted @ 2021-08-29 16:29 Jessica_xyx 阅读(46) 评论(0) 推荐(0)
摘要:455. 分发饼干 贪心算法求解,孩子指针和饼干指针,满足条件的话两个指针都++,不满足只有饼干++。 class Solution { public: int findContentChildren(vector<int>& g, vector<int>& s) { sort(g.begin(), 阅读全文
posted @ 2021-08-29 15:41 Jessica_xyx 阅读(39) 评论(0) 推荐(0)