上一页 1 2 3 4 5 6 7 8 9 10 ··· 53 下一页
摘要: 24. 两两交换链表中的节点 个人感觉这个不太难,刚开始打算用步进值为2,来搞,但是没有想到链表应该是怎么样的,原来可以直接用: 1 cur = cur->next->next 学到了,这是我自己写的代码: 1 ListNode* MyLinkedList::swapPairs(ListNode* 阅读全文
posted @ 2023-06-10 14:42 博二爷 阅读(916) 评论(0) 推荐(0) 编辑
摘要: 链表的构造: link.h: 1 #ifndef LINK_H 2 #define LINK_H 3 #include<vector> 4 5 struct ListNode { 6 int val; 7 ListNode* next; 8 ListNode() :val(0), next(null 阅读全文
posted @ 2023-06-09 23:13 博二爷 阅读(958) 评论(0) 推荐(0) 编辑
摘要: 977.有序数组的平方 1,因为是有序数组,所以会导致,两边大,中间小 2,又因为要排序所以可以仿照这个特点 3,从首尾两端,进行排序 代码: 1 //平方之后,列顺序 从低到高 2 vector<int> sortedSquares(vector<int>& nums) 3 { 4 vector< 阅读全文
posted @ 2023-06-08 23:53 博二爷 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 704 二分查找: 二分查找法: 难点: 1,while循环 left< right 还是 left <= right 2, right 是mid 还是 mid -1 解题思路: 【思考当l ==r 是否合法】 1,先确定是[l,r],还是[l,r) 具体步骤: 【l,r】 1,while(l <= 阅读全文
posted @ 2023-06-07 22:42 博二爷 阅读(203) 评论(0) 推荐(0) 编辑
摘要: _cache = new SourceCacheContext(); _cache.DirectDownload = true; _cache.MaxAge = DateTimeOffset.UtcNow; 阅读全文
posted @ 2023-05-05 10:36 博二爷 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 最简单的例子: 1 private static async Task Main(string[] args) 2 { 3 CancellationTokenSource tokenSource = new CancellationTokenSource(); 4 CancellationToken 阅读全文
posted @ 2023-03-25 21:20 博二爷 阅读(33) 评论(0) 推荐(0) 编辑
摘要: C:\Users\Lenovo\AppData\Local\Temp\NuGet 阅读全文
posted @ 2023-02-07 15:50 博二爷 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 代码: 1 public static async Task DownloadAsync(string packageId, string version) 2 { 3 var package = new PackageIdentity(packageId, NuGetVersion.Parse(v 阅读全文
posted @ 2023-01-08 15:49 博二爷 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 1 //var pathToSolutionFile = @"D:\VS2017\WorkSpace\Nufix\Repos\DevDiv\Example\Example\Example.sln"; 2 //var sln = SolutionFile.Parse(pathToSolutionFil 阅读全文
posted @ 2022-12-27 15:27 博二爷 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 1.关闭mysql服务 2.使用cd指令切换到mysql的bin目录 使用mysqld --console --skip-grant-tables --shared-memory如下图. 3.打开一个新的cmd窗口, mysql -u root -p发现可直接Enter键不输入密码进入mysql操作 阅读全文
posted @ 2022-10-11 21:03 博二爷 阅读(25) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 53 下一页