摘要: 151.翻转字符串里的单词 文章链接:https://programmercarl.com/0151.翻转字符串里的单词.html#思路 视频链接:https://www.bilibili.com/video/BV1uT41177fX/?vd_source=6cb513d59bf1f73f86d42 阅读全文
posted @ 2024-10-08 11:56 W-Vicky11 阅读(205) 评论(0) 推荐(0)
摘要: 转载:https://blog.csdn.net/weixin_44309097/article/details/124086049#:~:text=在c++中,有三种主 值传递 传递的仅仅是值: void swap(int x,int y){ int tmp=x; x=y; y=tmp; cout 阅读全文
posted @ 2024-10-08 11:24 W-Vicky11 阅读(49) 评论(0) 推荐(0)
摘要: 242.有效的字母异位词 文章链接:https://programmercarl.com/0242.有效的字母异位词.html#思路 视频链接:https://www.bilibili.com/video/BV1YG411p7BA/?vd_source=6cb513d59bf1f73f86d4225 阅读全文
posted @ 2024-09-30 16:41 W-Vicky11 阅读(253) 评论(0) 推荐(0)
摘要: What is Hash Table? 引用自文章链接:https://programmercarl.com/哈希表理论基础.html#哈希表 哈希表是根据关键码的值而直接进行访问的数据结构。直白来讲其实数组就是一张哈希表,哈希表中关键码就是数组的索引下标,然后通过下标直接访问数组中的元素。 哈希函 阅读全文
posted @ 2024-09-30 13:04 W-Vicky11 阅读(22) 评论(0) 推荐(0)
摘要: 24. 两两交换链表中的节点 文章链接:https://programmercarl.com/0024.两两交换链表中的节点.html#思路 视频讲解:https://www.bilibili.com/video/BV1YT411g7br 代码链接:https://leetcode.cn/probl 阅读全文
posted @ 2024-09-29 12:46 W-Vicky11 阅读(635) 评论(0) 推荐(0)
摘要: 203.移除链表元素 文章链接:https://programmercarl.com/0203.移除链表元素.html#算法公开课 视频讲解:https://www.bilibili.com/video/BV18B4y1s7R9 题目出处:https://leetcode.cn/problems/r 阅读全文
posted @ 2024-09-28 22:01 W-Vicky11 阅读(655) 评论(0) 推荐(0)
摘要: 引用自代码随想录:https://programmercarl.com/链表理论基础.html#其他语言版本 链表的存储方式 数组是在内存中是连续分布的,但是链表在内存中可不是连续分布的。 链表是通过指针域的指针链接在内存中各个节点。 所以链表中的节点在内存中不是连续分布的 ,而是散乱分布在内存中的 阅读全文
posted @ 2024-09-28 15:35 W-Vicky11 阅读(12) 评论(0) 推荐(0)
摘要: 209.长度最小的子数组 此题注重理解,同时我将res一开始初始化为sums的长度加一(因为不可能为此长度) INT32_MAX 是一个常量,代表 32 位有符号整数的最大值 class Solution { public: int minSubArrayLen(int target, vector 阅读全文
posted @ 2024-09-28 11:05 W-Vicky11 阅读(683) 评论(0) 推荐(0)
摘要: 704.二分查找 总结: 防止int溢出: //C++ class Solution { public: int search(vector<int>& nums, int target) { int left=0; int right=nums.size()-1; while(left<=righ 阅读全文
posted @ 2024-09-26 16:32 W-Vicky11 阅读(688) 评论(0) 推荐(0)
摘要: 强烈推荐 https://transformers.run/c1/transformer/ 该链接下的文章 阅读全文
posted @ 2024-09-25 20:03 W-Vicky11 阅读(11) 评论(0) 推荐(0)