摘要: 解法1: 关键词:有序,合并,中位数。 中位数表示左右两边数量相等,如果为奇数则为中间的数,如果是偶数就是中间两数求平均。(需要分奇偶讨论) 有序可以减去很多搜索树枝。 合并是个麻烦事,最直接的思路是直接暴力合并,但这样性能很差。或者说能找到两个集合之间的关系,不用合并是最好的。 从特殊点出发寻找一 阅读全文
posted @ 2021-09-26 17:54 none323 阅读(81) 评论(0) 推荐(0)
摘要: ##从Thread说起 考虑到leetcode上一道题:使用异步编程,依次输出first,second,thrid public class Foo { bool syncFirst = true; bool syncSecond=false; bool syncThird=false; publi 阅读全文
posted @ 2021-09-26 17:53 none323 阅读(61) 评论(0) 推荐(0)
摘要: 访问修饰符: 类 |Members of | Default member accessibility| | | | |enum | public| |class | private| |interface | public| |struct | private| 方法 属性 字段 扩展方法: 要点 阅读全文
posted @ 2021-09-26 17:52 none323 阅读(34) 评论(0) 推荐(0)
摘要: 恢复内容开始 文件类型 MDF files are the data files that hold the data and objects such as tables, indexes, stored procedures and views. LDF files are the transa 阅读全文
posted @ 2021-09-26 17:52 none323 阅读(110) 评论(0) 推荐(0)
摘要: ##基本数据类型 整形数据: | | | | | | | bigint | 8 byte | |int|4 byte| |smallint|2 byte| |tinyint|1 byte| C#定义的整形数据 | | | | | | | long | 8 byte | | ulong | 8 byt 阅读全文
posted @ 2021-09-26 17:52 none323 阅读(58) 评论(0) 推荐(0)
摘要: ##Array Array是个抽象类,不能实例化。Array的具体实现 Person[] people = new Person[] { new Person("nihao",1),new Person("zhishu", 3)}; Array一旦确定就不能改变长度。 ##List 1. List 阅读全文
posted @ 2021-08-17 09:24 none323 阅读(46) 评论(0) 推荐(0)
摘要: 1. IEnumerable,IEnumerator public class MyIEnumerableClass<T> : IEnumerable<T>,IEnumerator<T> //可迭代类自己实现迭代器 { private T[] _data; private int _currentI 阅读全文
posted @ 2021-08-09 11:31 none323 阅读(81) 评论(0) 推荐(0)
摘要: 1. StringBuilder 初始化 StringBuilder sb = new StringBuilder("ABC", 50); sb.Append(new char[] { 'D', 'E', 'F' }); sb.AppendFormat("GHI{0}{1}", 'J', 'k'); 阅读全文
posted @ 2021-08-04 10:20 none323 阅读(84) 评论(0) 推荐(0)
摘要: 1. string str=null 初始化但不分配地址。 2. string str="" 初始化并分配地址,内部储存空字符串。 ##3. string str=string.Empty string.Empty是privacy static readonly类型的数据,内部值同样为"" 但是和" 阅读全文
posted @ 2021-08-03 15:38 none323 阅读(529) 评论(0) 推荐(0)
摘要: 1. 类和结构 类 成员 说明 字段 属性 常量 方法 构造函数 析构函数 索引器 运算符 事件 类型(内部类) 成员说明字段属性常量方法构造函数析构函数索引器运算符事件类型(内部类) 属性: 初始化 public int Age( get; set; )=10 访问修饰符 方法 个数可变的参数 p 阅读全文
posted @ 2021-08-03 13:26 none323 阅读(70) 评论(0) 推荐(0)