Eagle233-Blog
dev-mdsuper
[Algorithms] LeetCode 20. 有效的括号
Categories Algorithms StackAndQueue | Tags
来源:代码随想录 LeetCode 20. 有效的括号 栈模拟注意最后判断空栈。 class Solution { public: bool isValid(string ...
[Algorithms] LeetCode 225. 用队列实现栈
Categories Algorithms StackAndQueue | Tags
来源:代码随想录 LeetCode 225. 用队列实现栈 单个队列模拟栈class MyStack { public: queue<int> que; ...
[Algorithms] LeetCode 232.用栈实现队列
Categories Algorithms StackAndQueue | Tags
来源:代码随想录 LeetCode 232.用栈实现队列 直观的方法效率不高。 class MyQueue { public: stack<int> in; ...
[CSAPP] Lab2 - Bomb Lab Report
Categories CSAPP | Tags
整体思路:利用汇编语言知识结合 gdb 调试一起推导过程,仅调试和仅观察都无法解开问题,必须一边调试一边理解汇编代码,找出答案规律。 Phase 1汇编代码0000000000400ee0 ...
[Algorithms] LeetCode 459. 重复的子字符串
Categories Algorithms String | Tags
来源:代码随想录 LeetCode 459. 重复的子字符串 KMP如果 len % (len - next[len - 1]) == 0并且next[len - 1] != 0 ,则说明数...
[Algorithms] LeetCode 28. 找出字符串中第一个匹配项的下标
Categories Algorithms String | Tags
来源:代码随想录 LeetCode 28. 找出字符串中第一个匹配项的下标 KMPKMP实际上是优化过的滑动窗口,只不过优化得有点太巧妙了。 看这个视频:Knuth–Morris–Pratt...
[Algorithms] KamaCoder 55. 右旋字符串(第八期模拟笔试)
Categories Algorithms String | Tags
来源:代码随想录 KamaCoder 55. 右旋字符串(第八期模拟笔试) 三次反转#include <bits/stdc++.h> using namespace std; in...
[Algorithms] LeetCode 151. 反转字符串中的单词
Categories Algorithms String | Tags
来源:代码随想录 LeetCode 151. 反转字符串中的单词 stringstream利用stringstream可以快速分割单词。每个单词反转后再全部反转。 class Solutio...
[Algorithms] KamaCoder 54. 替换数字(第八期模拟笔试)
Categories Algorithms String | Tags
来源:代码随想录 KamaCoder 54. 替换数字(第八期模拟笔试) 双指针每次遇到数字都把第二个指针指向五个元素后,将字符串复制到后面。 #include <bits/stdc+...
[Algorithms] LeetCode 541. 反转字符串 II
Categories Algorithms String | Tags
来源:代码随想录 LeetCode 541. 反转字符串 II 单指针玩几天脑子进水了,这题都不会做了。后继比较难的可以直接用reverse,没必要再自己写了。 class Solution...
© 2025 Eagle233
Powered By Hexo & Theme mdsuper