觉醒火龙果很想五点下课
觉醒火龙果很想五点下课
全部文章
分类
归档
标签
去牛客网
登录
/
注册
觉醒火龙果很想五点下课的博客
全部文章
(共81篇)
题解 | 计算器(二)
class Solution { public: //对加法乘除进行优先级的标号 unordered_map<char, int> order = { {'+', 1}, {'-', 1}, {'*', 2}, ...
2025-05-10
0
21
题解 | 移掉 K 位数字
class Solution { public: string removeKnums(string num, int k) { stack<int> stk; //维护递增栈,让小的数放在高位, for(char digit:n...
2025-05-10
0
32
题解 | 每日温度
class Solution { public: vector<int> temperatures(vector<int>& dailyTemperatures) { int size = dailyTemperatures.size(); ...
2025-05-06
0
22
题解 | 字符串解码
class Solution { public: string decodeString(string s) { //使用两个栈,数字与字符 stack<int> stk_num; stack<string> stk_s...
2025-05-06
0
23
题解 | 多组_带空格的字符串_T组形式
#include <iostream> #include <string> #include <algorithm> #include <vector> using namespace std; int main() { int n; ...
2025-04-17
0
28
题解 | 单组_字符串
#include <iostream> #include <string> #include <algorithm> //reverse using namespace std; int main() { int n = 0; cin >...
2025-04-17
0
31
题解 | 合法的括号字符串
class Solution { public: bool isValidString(string s) { stack<int> left; stack<int> star; //使用了两个栈,一个存左括号,一个存右括号; ...
2025-04-16
0
29
题解 | 单调栈
class Solution { public: vector<vector<int> > foundMonotoneStack(vector<int>& nums) { //单调栈:单增栈,新数来,把栈中大于它的所有数弹出,既是找最近小...
2025-04-16
0
28
题解 | 表达式求值
class Solution { public: unordered_map<char, int> mp={ //设定优先级,用于判断 {'+', 1}, {'-', 1}, {'*', 2} }; //使用...
2025-04-15
0
27
题解 | 栈和排序
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * 栈排序 * @param a int整型vector 描述入栈顺序 * @return int整型...
2025-04-14
0
26
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页