05 2024 档案

摘要:原文链接:https://blog.csdn.net/changyuanchn/article/details/51476281 引言据说有人归纳了计算机的五大常用算法,它们是贪婪算法,动态规划算法,分治算法,回溯算法以及分支限界算法。虽然不知道为何要将这五个算法归为最常用的算法,但是毫无疑问,这五 阅读全文
posted @ 2024-05-14 16:54 yinghualeihenmei 阅读(3) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/u013309870/article/details/75193592 http://t.csdnimg.cn/GgRFt 动态规划算法的核心 理解一个算法就要理解一个算法的核心,动态规划算法的核心是下面的一个小故事。 A * "1+1+1+1+ 阅读全文
posted @ 2024-05-14 13:36 yinghualeihenmei 阅读(2) 评论(0) 推荐(0) 编辑
摘要:public void Rotate(int[] nums, int k) { int n=nums.Length; int[] newNums=new int[n]; for(int i=0;i<n;i++) { newNums[(i + k) % n] = nums[i]; } for (int 阅读全文
posted @ 2024-05-13 01:01 yinghualeihenmei 阅读(2) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/weixin_42521628/article/details/119123550 1、桌面上选中“计算机”,“右击”-“管理”,在“服务和应用程序”中找到“服务”; 2、在“服务”中找到Windows Modules Installer服务,“ 阅读全文
posted @ 2024-05-09 09:45 yinghualeihenmei 阅读(4) 评论(0) 推荐(0) 编辑
摘要:public int MajorityElement(int[] nums) { Dictionary<int, int> dic = new Dictionary<int ,int>(); foreach (int num in nums) { if(!dic.ContainsKey(num)) 阅读全文
posted @ 2024-05-08 23:08 yinghualeihenmei 阅读(2) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://learn.microsoft.com/zh-cn/dotnet/fundamentals/code-analysis/quality-rules/ca1864 Dictionary<TKey,TValue>.ContainsKey(TKey) 和 Dictionary<T 阅读全文
posted @ 2024-05-08 16:46 yinghualeihenmei 阅读(6) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://www.cnblogs.com/zhuqs/p/9233887.html navigator.userAgent.toLowerCase() 判断当前用户所使用的浏览器navigator是HTML的内置对象; userAgent是navigator的属性方法,可以返回客户机 阅读全文
posted @ 2024-05-07 22:10 yinghualeihenmei 阅读(3) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://www.cnblogs.com/zhouyunbaosujina/p/3303136.html System.DateTime的最小可能值:DateTime.MinValue.ToString()=0001-1-1 0:00:00 我们实际用的时候会指定一个默认值DateT 阅读全文
posted @ 2024-05-07 15:31 yinghualeihenmei 阅读(14) 评论(0) 推荐(0) 编辑
摘要:与正常的绑定是不一样的,需要用 Text='<%# Eval("zyddpj") %>' 阅读全文
posted @ 2024-05-07 10:22 yinghualeihenmei 阅读(3) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/weixin_39779530/article/details/118244250 目前看到有两种关闭方式,一种是关闭索引index,一种是通过名称title关闭。 需求: easyUI 关闭tab页 方法: $("#tt").tabs("clo 阅读全文
posted @ 2024-05-06 15:00 yinghualeihenmei 阅读(3) 评论(0) 推荐(0) 编辑
摘要:非严格递增排列 的数组 nums,意思是有序递增的,但是有相同的元素 我写的: public int RemoveDuplicates(int[] nums) { int length=nums.Length; int low=0; for(int i=0;i<length;i++) { int n 阅读全文
posted @ 2024-05-05 18:37 yinghualeihenmei 阅读(1) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/anxin_hw/article/details/128312846 一、错误使用场景 1、普通for循环遍历List删除指定元素,list.remove(index) 示例:将姓张的名字移除掉 List<String> nameList = new Ar 阅读全文
posted @ 2024-05-04 21:46 yinghualeihenmei 阅读(45) 评论(0) 推荐(0) 编辑
摘要:数组移除数据,需要循环覆盖的方法。 可以快慢双指针。循环一遍。 public int RemoveElement(int[] nums, int val) { int n=nums.Length; int low=0; for(int i=0;i<n;i++) { if(nums[i]!=val) 阅读全文
posted @ 2024-05-04 21:36 yinghualeihenmei 阅读(2) 评论(0) 推荐(0) 编辑
摘要:在C#中,可以使用内置的排序方法对数组进行排序。以下是一些常用的排序方法: 使用Array.Sort<T>方法对数组进行排序。这是一个通用方法,可以对任何类型的数组进行排序,只要类型实现了IComparable接口。 int[] array = new int[] { 3, 1, 4, 1, 5, 阅读全文
posted @ 2024-05-03 01:03 yinghualeihenmei 阅读(15) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://www.cnblogs.com/jk-2048/p/18030587 https://blog.csdn.net/xiongyanglai/article/details/136473932 1、所属命名空间 .NET 3.5在 System.Collections.Gen 阅读全文
posted @ 2024-05-02 23:58 yinghualeihenmei 阅读(16) 评论(0) 推荐(0) 编辑
摘要:我写的: public int VowelStrings(string[] words, int left, int right) { string s="aeiou"; int k=0; for(int i=left;i<=right;i++) { int x=0,y=0; string word 阅读全文
posted @ 2024-05-02 13:49 yinghualeihenmei 阅读(1) 评论(0) 推荐(0) 编辑
摘要:转置让我写成了对角线交换。。。 还是要记录下 对角线交换代码: public int[][] Transpose(int[][] matrix) { int temp=0; int m = matrix.Length, n = matrix[0].Length; for(int i=0;i<m;i+ 阅读全文
posted @ 2024-05-02 13:14 yinghualeihenmei 阅读(2) 评论(0) 推荐(0) 编辑
摘要:Math.Max(ans, score) 阅读全文
posted @ 2024-05-01 19:05 yinghualeihenmei 阅读(8) 评论(0) 推荐(0) 编辑
摘要:string str = "Hello, World!"; char character = str[6]; // 取索引为6的字符,结果为'W' Console.WriteLine(character); // 输出: W string s = "011101";s[i] == '0';//i为字 阅读全文
posted @ 2024-05-01 19:02 yinghualeihenmei 阅读(3) 评论(0) 推荐(0) 编辑