题目 任务描述 本关任务:请实现函数 revWordoder,能够将 pa 指向的单词表字符串中的所有单词,按相反顺序放入 pb,同时去除多余的空格,单词之间只留一个空格. 例如 pa 中为 red blue, 则调用函数后,pb 中为b…
2023每日刷题(四十四)
Leetcode—2336.无限集中的最小数字 实现代码
class SmallestInfiniteSet {set<int> s;
public:SmallestInfiniteSet() {for(int i 1; i < 1000; i) {s.insert(i);}}int popSmallest() {int res *s.begin();s.erase(s…