上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 43 下一页

2015年12月10日

Lambda表达式

摘要: Lambda表达式其实就是个匿名函数,这种函数在程序中只使用一次,所以也就不用去特地定义和命名。Lambda的语法形式如下:[函数对象参数] (操作符重载函数参数) mutable或exception声明 ->返回值类型 {函数体}[函数对象参数]空。没有使用任何函数对象参数。=。按值传递了所有函数... 阅读全文

posted @ 2015-12-10 14:54 joannae 阅读(328) 评论(0) 推荐(0) 编辑

2015年12月9日

179. Largest Number(INT, String)

摘要: Given a list of non negative integers, arrange them such that they form the largest number.For example, given [3, 30, 34, 5, 9], the largest formed nu... 阅读全文

posted @ 2015-12-09 17:11 joannae 阅读(245) 评论(0) 推荐(0) 编辑

2015年12月6日

137. Single Number II (Bit)

摘要: Given an array of integers, every element appears three times except for one. Find that single one. Note:Your algorithm should have a linear runtime c 阅读全文

posted @ 2015-12-06 07:25 joannae 阅读(175) 评论(0) 推荐(0) 编辑

136. Single Number (Bit)

摘要: Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexi... 阅读全文

posted @ 2015-12-06 07:12 joannae 阅读(126) 评论(0) 推荐(0) 编辑

2015年12月5日

89. Gray Code (Bit)

摘要: The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total num 阅读全文

posted @ 2015-12-05 11:46 joannae 阅读(168) 评论(0) 推荐(0) 编辑

57. Insert Interval (Array; Sort)

摘要: Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initia 阅读全文

posted @ 2015-12-05 10:36 joannae 阅读(152) 评论(0) 推荐(0) 编辑

56. Merge Intervals (Array; Sort)

摘要: Given a collection of intervals, merge all overlapping intervals. For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18]. 注意点: 1。并不是 阅读全文

posted @ 2015-12-05 10:35 joannae 阅读(137) 评论(0) 推荐(0) 编辑

边界检测

摘要: 比大小时=的情况leetcode:42 阅读全文

posted @ 2015-12-05 07:33 joannae 阅读(166) 评论(0) 推荐(0) 编辑

2015年12月3日

对象池 object pool

摘要: 对象池适用于:对象的创建很耗时对象频繁地释放再创建对象池的实现:将释放的对象放进对象池中,在新建对象时,从对象池取对象public class ObjectPool where T : class, new(){ private Stack m_objectStack = new Stack(... 阅读全文

posted @ 2015-12-03 09:51 joannae 阅读(348) 评论(0) 推荐(0) 编辑

2015年11月16日

自对齐(self-aligned)

摘要: C语言是自对齐的,32位以4字节对齐,64位以8字节对齐(1字节=8 bits)自对齐的好处:在一条指令内完成数据的取或者存的操作,使得内存访问更快;否则,如果一个变量跨机器字存储,那么要做两次或更多次的访问(先取存在前一个机器字的内容,再取存在后一个机器字的内容)。对齐要求:字符可以起始于任何字节... 阅读全文

posted @ 2015-11-16 16:22 joannae 阅读(386) 评论(0) 推荐(0) 编辑

上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 43 下一页

导航