C#解leetcode 64. Minimum Path Sum
摘要:Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.
阅读全文
posted @
2016-03-25 10:25
狂奔的蜗牛163
阅读(276)
推荐(0)
C#解leetcode 53.Maximum Subarray
摘要:Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [−2,1,−3,4,−1,2,
阅读全文
posted @
2016-03-24 16:23
狂奔的蜗牛163
阅读(328)
推荐(0)
C#解leetcode 152. Maximum Product Subarray
摘要:Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4],t
阅读全文
posted @
2016-03-24 15:42
狂奔的蜗牛163
阅读(282)
推荐(0)
C#解leetcode 106. Construct Binary Tree from Inorder and Postorder Traversal
摘要:Given inorder and postorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. 这个题目是给你一棵树的中
阅读全文
posted @
2016-03-22 20:51
狂奔的蜗牛163
阅读(389)
推荐(0)
C#解leetcode 11. Container With Most Water
摘要:Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpo
阅读全文
posted @
2016-03-21 20:18
狂奔的蜗牛163
阅读(207)
推荐(0)
c# hasvalue属性
摘要:// 数据类型? 表示参数的值可以为null空,此时这个参数可调用属性hasvalue来判断,此参数是否有除了null以外的值;进而进行其它的工作 //必须要加?才可用hasvalue属性 private int? x = null; //或者写成private int? x 一个作用 private void Form1_Load(object sender, Event...
阅读全文
posted @
2016-03-21 18:50
狂奔的蜗牛163
阅读(2518)
推荐(0)
C#解leetcode 238. Product of Array Except Self
摘要:Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except
阅读全文
posted @
2016-03-18 21:18
狂奔的蜗牛163
阅读(424)
推荐(0)
win7/win8 64位系统注册TeeChart8.ocx 控件---以及dllregisterserver调用失败问题解决办法
摘要:TeeChart控件就不多介绍了,很多朋友不知道开始怎么注册使用,尤其是在64位系统下如何注册的问题,具体如下: win7、win8 64位系统问题所在: 64位的系统一般都是可以安装32位程序的 执行C:WindowsSysWOW64regsvr32.exe,而不是C:WindowsSystem3
阅读全文
posted @
2016-03-17 16:52
狂奔的蜗牛163
阅读(6138)
推荐(0)
C#解leetcode 219. Contains Duplicate II
摘要:该题用到了.NET 3.5在System.Collections.Generic命名空间中包含一个新的集合类:HashSet<T>的Add()方法,详细信息请看转载:C# HashSet 用法。 题目: Given an array of integers and an integer k, f
阅读全文
posted @
2016-03-14 20:13
狂奔的蜗牛163
阅读(364)
推荐(0)
转载:C# HashSet 用法
摘要:原文地址:http://www.cnblogs.com/xiaopin/archive/2011/01/08/1930540.html 感谢博主分享! NET 3.5在System.Collections.Generic命名空间中包含一个新的集合类:HashSet<T>。这个集合类包含不重复项的
阅读全文
posted @
2016-03-14 20:09
狂奔的蜗牛163
阅读(15086)
推荐(1)
C#解leetcode:119. Pascal's Triangle II
摘要:题目是: Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3,Return [1,3,3,1]. Note:Could you optimize your algorithm
阅读全文
posted @
2016-03-13 17:29
狂奔的蜗牛163
阅读(519)
推荐(1)
C#解leetcode 189. Rotate Array
摘要:Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4]. Not
阅读全文
posted @
2016-03-10 09:33
狂奔的蜗牛163
阅读(445)
推荐(0)
C#解leetcode 228. Summary Ranges Easy
摘要:Given a sorted integer array without duplicates, return the summary of its ranges. For example, given [0,1,2,4,5,7], return ["0->2","4->5","7"]. 我的代码,
阅读全文
posted @
2016-03-09 18:31
狂奔的蜗牛163
阅读(234)
推荐(0)
转载:C#中事件和委托的编译代码
摘要:接上文转载:C#中事件的由来,这时候,我们注释掉编译错误的行,然后重新进行编译,再借助Reflactor来对 event的声明语句做一探究,看看为什么会发生这样的错误: public event GreetingDelegate MakeGreet; 可以看到,实际上尽管我们在GreetingMan
阅读全文
posted @
2016-03-08 16:47
狂奔的蜗牛163
阅读(175)
推荐(0)
转载:C#中事件的由来
摘要:原文地址 http://www.tracefact.net/CSharp-Programming/Delegates-and-Events-in-CSharp.aspx 感谢博主分享! 我们继续思考转载:C# 中的委托中的例子程序:上面的三个方法都定义在Programe类中,这样做是为了理解的方便,
阅读全文
posted @
2016-03-07 20:41
狂奔的蜗牛163
阅读(444)
推荐(0)
转载:C# 中的委托
摘要:原文地址 http://www.tracefact.net/CSharp-Programming/Delegates-and-Events-in-CSharp.aspx 感谢博主分享! 引言 委托和事件在 .Net Framework中的应用非常广泛,然而,较好地理解委托和事件对很多接触C#时间不长
阅读全文
posted @
2016-03-07 20:17
狂奔的蜗牛163
阅读(261)
推荐(0)
转载:C# 之泛型详解
摘要:本文原地址:http://www.blogjava.net/Jack2007/archive/2008/05/05/198566.html。感谢博主分享! 什么是泛型 我们在编写程序时,经常遇到两个模块的功能非常相似,只是一个是处理int数据,另一个是处理string数据,或者其他自定义的数据类型,
阅读全文
posted @
2016-03-06 13:59
狂奔的蜗牛163
阅读(238)
推荐(0)
需要学习的内容
摘要:C#基础知识 1 传智播客 苏坤视频 2 赵四本 C# in depth CLR via C# 数据结构与算法 操作系统 设计模式 系统架构 需要在leetcode上刷题(有利于找工作)
阅读全文
posted @
2016-03-06 09:57
狂奔的蜗牛163
阅读(220)
推荐(0)
关于C#中get和set
摘要:在看书的时候看见了一段代码,有两个类person: public class person { public string name; } public class person { public string Name{set;get;} } 第一个类型的name属性未封装,其name属性直接通过
阅读全文
posted @
2016-03-04 21:58
狂奔的蜗牛163
阅读(9263)
推荐(1)
骑士飞行棋 C#代码详解
摘要:最近看见一个骑士飞行棋的小游戏代码,感觉这个代码中将大多数C#的基础知识都运用到了,是一个新手检验学习成果的有效方法,特此将这个代码整理一遍。这是一个控制台程序。这是代码下载地址,代码中的注释非常详细介绍了每段代码的作用: http://files.cnblogs.com/files/xiaohua
阅读全文
posted @
2016-03-04 17:13
狂奔的蜗牛163
阅读(3140)
推荐(0)
C#中的static静态变量的用法
摘要:静态全局变量 定义:在全局变量前,加上关键字 static 该变量就被定义成为了一个静态全局变量。 特点: A、该变量在全局数据区分配内存。 B、初始化:如果不显式初始化,那么将被隐式初始化为0。 静态局部变量 定义:在局部变量前加上static关键字时,就定义了静态局部变量。 特点: A、该变量在
阅读全文
posted @
2016-03-04 10:20
狂奔的蜗牛163
阅读(32861)
推荐(0)
Break和Continue的一些注意事项
摘要:Break: 1)可以用于switch-case判断中,用于跳出switch 2)用在循环中,用于立即跳出循环 其中,用于循环的情况下,跳出的是break所在的循环 Continue: 立即结束本次循环,然后判断循环条件,若条件满足则立即进入下一次循环。
阅读全文
posted @
2016-03-03 09:33
狂奔的蜗牛163
阅读(215)
推荐(0)
枚举类型
摘要:语法: enum 类型名称{值1,值2,值3.。。。。。值n}; 举例: 1)定义: enum Gender { 男,女 } 2)使用: Gender sex; sex=Gender.男 枚举的定义,一般和类定义在同一个级别。这样,在同一个命名空间下的所有类都可以用这个枚举了 注意:定义枚举时候,不
阅读全文
posted @
2016-03-03 09:18
狂奔的蜗牛163
阅读(174)
推荐(0)