04 2023 档案

摘要:namespace MyLink; public class MyLinkedList { private int _size{get;set;} public class MyTreeNode{ public int val{get;set;} public MyTreeNode next{get 阅读全文
posted @ 2023-04-30 11:52 vba是最好的语言 阅读(11) 评论(0) 推荐(0) 编辑
摘要:static void RemoveDataFromList(int[] nums, int val) { int j = nums.Length - 1; int i = 0; while (i <= j) // 感觉总卡在边界上 { if (nums[i] == val) { int temp 阅读全文
posted @ 2023-04-25 11:16 vba是最好的语言 阅读(17) 评论(0) 推荐(0) 编辑
摘要:Sub zz() ar = Range("A1").CurrentRegion m = 1 For i = 2 To UBound(ar) If ar(i, 1) <> "B" Then m = m + 1 For j = 1 To 2 ar(m, j) = ar(i, j) Next End If 阅读全文
posted @ 2023-04-24 16:10 vba是最好的语言 阅读(481) 评论(0) 推荐(0) 编辑
摘要:static void Main(string[] args) { // 只能用一次 //IList<HUOWU> hUOWUs = new List<HUOWU>{ // new HUOWU(1,1),new HUOWU(2,5),new HUOWU(3,4), // new HUOWU(6,7) 阅读全文
posted @ 2023-04-24 14:03 vba是最好的语言 阅读(19) 评论(0) 推荐(0) 编辑
摘要:将 字典d 放到 A:B 列: [a1].Resize(d.Count) = Application.Transpose(d.keys) [b1].Resize(d.Count) = Application.Transpose(d.items) d.keys 是一个数组, d.items是一个数组 阅读全文
posted @ 2023-04-24 11:18 vba是最好的语言 阅读(96) 评论(0) 推荐(0) 编辑
摘要:Sub 宏1() ' ' 宏1 修改链接的数据源地址 ' ' Application.Left = 437.5 Application.Top = 171 ActiveWorkbook.ChangeLink Name:="C:\Users\Administrator\Desktop\测试\数据源.x 阅读全文
posted @ 2023-04-23 09:18 vba是最好的语言 阅读(302) 评论(0) 推荐(0) 编辑
摘要:/// <summary> /// 机器人 不停尝试 /// </summary> /// <param name="start">开始位置</param> /// <param name="aim">要到的位置</param> /// <param name="n">总的数</param> /// 阅读全文
posted @ 2023-04-22 21:44 vba是最好的语言 阅读(32) 评论(0) 推荐(0) 编辑
摘要:public class ClientT { public void Request() { Target target = new AdapterT (); target.Request(); } } public class Target{ public virtual void Request 阅读全文
posted @ 2023-04-21 07:23 vba是最好的语言 阅读(11) 评论(0) 推荐(0) 编辑
摘要:public class Solution { public int Fib(int n) { if(n==0 || n ==1) return n; int[] cache = new int[n+1]; cache[0] = 0; cache[1] = 1; for(int i=2;i<=n;i 阅读全文
posted @ 2023-04-19 22:05 vba是最好的语言 阅读(26) 评论(0) 推荐(0) 编辑
摘要:http://www.nndssk.com/rjwt/154922gHfJ3F.html 阅读全文
posted @ 2023-04-19 14:33 vba是最好的语言 阅读(80) 评论(0) 推荐(0) 编辑
摘要:public class Solution { public IList<IList<int>> Generate(int numRows) { IList<IList<int>> rt = new List<IList<int>>(20); Queue queue = new Queue(); i 阅读全文
posted @ 2023-04-17 22:07 vba是最好的语言 阅读(23) 评论(0) 推荐(0) 编辑
摘要:namespace ZXDC; public class ZXDCS{ /// <summary> /// 前n位有多少中心对称数 /// n=1 1 8 0 /// n=2 11 69 96 88 /// </summary> public static void Show() { var zt 阅读全文
posted @ 2023-04-16 22:07 vba是最好的语言 阅读(13) 评论(0) 推荐(0) 编辑
摘要:namespace Binary; public class BinaryTree{ public Node<char> Head{ get; private set; } private string cStr{get;set;} public BinaryTree(string construc 阅读全文
posted @ 2023-04-16 12:44 vba是最好的语言 阅读(36) 评论(0) 推荐(0) 编辑
摘要:/** * Definition for singly-linked list. * public class ListNode { * public int val; * public ListNode next; * public ListNode(int x) { val = x; } * } 阅读全文
posted @ 2023-04-15 22:45 vba是最好的语言 阅读(15) 评论(0) 推荐(0) 编辑
摘要:public class Solution { public int NumIslands(char[][] grid) { if(grid == null || grid.Count() == 0) return 0; int rowCount = grid.Count(); int colCou 阅读全文
posted @ 2023-04-15 12:16 vba是最好的语言 阅读(8) 评论(0) 推荐(0) 编辑
摘要:int NthUglyNumber(int n) { if(n == 1) return 1; List<long> arr = new List<long>(); // 这里用list,它会自己扩容,用数组就需要自己操作这些了 arr.Add(1); int[] uglyArr = {2,3,5} 阅读全文
posted @ 2023-04-15 10:07 vba是最好的语言 阅读(15) 评论(0) 推荐(0) 编辑
摘要:static void Main(string[] args) { string[] cities = new string[] { "Delhi" , "Kolkata", "New York" , "London", "Tokyo" , "Washington", "Tokyo" }; Hash 阅读全文
posted @ 2023-04-12 09:22 vba是最好的语言 阅读(24) 评论(0) 推荐(0) 编辑
摘要:C# List引用类型克隆的3种方法 这篇文章主要给大家介绍了关于C# List引用类型克隆的3种方法,包括反射、序列化(依赖Newtonsoft.Json) 以及序列化(BinaryFormatter)的实现方法,需要的朋友可以参考借鉴,下面来一起看看吧 前言 有时候我们想克隆一个List去做别的 阅读全文
posted @ 2023-04-11 13:17 vba是最好的语言 阅读(261) 评论(0) 推荐(0) 编辑
摘要://如果要比较序列中对象的实际数据而不是仅仅比较它们的引用,则必须在类中实现IEqualityComparer<T> 泛型接口 public class People:IEquatable<People> { public string Name { get; set; } public int A 阅读全文
posted @ 2023-04-11 09:22 vba是最好的语言 阅读(51) 评论(0) 推荐(0) 编辑
摘要:public class Solution { public IList<IList<int>> Permute(int[] nums) { var rtItem = new List<int>(); var visited= new Dictionary<int, bool>(); IList<I 阅读全文
posted @ 2023-04-09 10:54 vba是最好的语言 阅读(46) 评论(0) 推荐(0) 编辑
摘要:namespace JD; public class JDTest{ public static void Show() { int[] arr = {1,2,3,4,5,6,7}; var root = BuildTree2(arr,0,arr.Length-1); var stack = new 阅读全文
posted @ 2023-04-08 22:39 vba是最好的语言 阅读(33) 评论(0) 推荐(0) 编辑
摘要:Stack<int> stack = new Stack<int>(); int temp = 0; HS(92); void HS(int i) { if(i == 100) return; stack.Push(i); Console.WriteLine($"回溯前i:{i}"); HS(i+1 阅读全文
posted @ 2023-04-08 10:43 vba是最好的语言 阅读(36) 评论(0) 推荐(0) 编辑
摘要:namespace Test2; // Definition for singly-linked list. public class ListNode { public int val; public ListNode next; public ListNode(int val=0, ListNo 阅读全文
posted @ 2023-04-05 07:42 vba是最好的语言 阅读(15) 评论(0) 推荐(0) 编辑
摘要:新建一个集合:删除其中一个元素 List<String> tempList = new List<string>{"水星","金星","地球","火星", "木星","土星","天王星","海王星","冥王星","冥王星"}; tempList.Remove("冥王星"); foreach(var 阅读全文
posted @ 2023-04-04 10:52 vba是最好的语言 阅读(275) 评论(0) 推荐(0) 编辑
摘要:Sub accTrans() Dim Conn As New ADODB.Connection 'Conn.Open ".......连接你的Acc数据库.........." On Error GoTo ErrHndl: Conn.BeginTrans '事务开始 Sql = "update a 阅读全文
posted @ 2023-04-04 09:31 vba是最好的语言 阅读(61) 评论(0) 推荐(0) 编辑
摘要:你总共有 n 枚硬币,并计划将它们按阶梯状排列。对于一个由 k 行组成的阶梯,其第 i 行必须正好有 i 枚硬币。阶梯的最后一行 可能 是不完整的。 给你一个数字 n ,计算并返回可形成 完整阶梯行 的总行数。 应该首先判断数据源是否是有序的,先二分。 var rs = ArrangeCoins(1 阅读全文
posted @ 2023-04-02 14:10 vba是最好的语言 阅读(11) 评论(0) 推荐(0) 编辑
摘要:using System; namespace PX; public class PXTest { public static void Show() { ScoreInfo scoreInfo = new ScoreInfo() { ID = 1, Name = "张三", CSharp = 12 阅读全文
posted @ 2023-04-01 23:28 vba是最好的语言 阅读(16) 评论(0) 推荐(0) 编辑
摘要:using System.Collections; using System.Collections.Generic; namespace HS; public class HXTest{ public const int k = 500_001; // 生成一个长度为50万的数组并初始化 publ 阅读全文
posted @ 2023-04-01 22:23 vba是最好的语言 阅读(64) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示