摘要: 题目: ![](https://img2023.cnblogs.com/blog/2679751/202308/2679751-20230802193141817-1811948200.png) ``` class Solution { public: int search(vector& nums 阅读全文
posted @ 2023-08-02 19:32 孜孜不倦fly 阅读(11) 评论(0) 推荐(0)
摘要: 题目; ![](https://img2023.cnblogs.com/blog/2679751/202308/2679751-20230802192536628-206460080.png) ``` class Solution { public: int findRepeatNumber(vec 阅读全文
posted @ 2023-08-02 19:27 孜孜不倦fly 阅读(13) 评论(0) 推荐(0)
摘要: 题目: ![](https://img2023.cnblogs.com/blog/2679751/202308/2679751-20230801222205510-410270968.png) //不可以用代码随想录里螺旋矩阵的思路 ``` class Solution { public: vect 阅读全文
posted @ 2023-08-01 22:30 孜孜不倦fly 阅读(5) 评论(0) 推荐(0)
摘要: 题目: class MaxQueue { public: deque<int> que1; //使用两个双端队列(deque和queue不一样,用deque就行) deque<int> que2; MaxQueue() { } int max_value() { return que2.empty( 阅读全文
posted @ 2023-07-31 22:40 孜孜不倦fly 阅读(20) 评论(0) 推荐(0)
摘要: 题目: ![](https://img2023.cnblogs.com/blog/2679751/202307/2679751-20230731211502474-1179914637.png) ``` class MinStack { public: stack st1; //维护原栈 stack 阅读全文
posted @ 2023-07-31 21:26 孜孜不倦fly 阅读(12) 评论(0) 推荐(0)
摘要: 1.python的数据用[ ]选择数据下标 2.python的下标从0开始 3.python的数据切片是“左闭右开的”,例如:python中写a[0:5],实际上是取a中下标为“0-4”的元素,即实际中的第1~5个元素。 阅读全文
posted @ 2023-07-31 11:39 孜孜不倦fly 阅读(20) 评论(0) 推荐(0)
摘要: 题目: ![](https://img2023.cnblogs.com/blog/2679751/202307/2679751-20230728211600053-1162793060.png) ``` class Solution { public: vector maxSlidingWindow 阅读全文
posted @ 2023-07-28 21:25 孜孜不倦fly 阅读(11) 评论(0) 推荐(0)
摘要: 前提是没有使用dilation,牢记以下公式: ![](https://img2023.cnblogs.com/blog/2679751/202307/2679751-20230728153345656-868602173.png) 1.如果想保持张量大小不变,则:kenel_size=3(奇数), 阅读全文
posted @ 2023-07-28 15:37 孜孜不倦fly 阅读(117) 评论(0) 推荐(0)
摘要: 题目: ![](https://img2023.cnblogs.com/blog/2679751/202307/2679751-20230727205808737-1880467450.png) ``` class CQueue { public: stack st1; stack st2; CQu 阅读全文
posted @ 2023-07-27 21:03 孜孜不倦fly 阅读(8) 评论(0) 推荐(0)
摘要: 题目: class Solution { public: string reverseWords(string s) { //该方法利用递归栈的逆序将单词逆序 string word; //保存一个完整的单词 if(s.empty()) return word; //终止条件,即最后一次递归会收到空 阅读全文
posted @ 2023-07-27 20:04 孜孜不倦fly 阅读(8) 评论(0) 推荐(0)