List Class
Stack Class
Queue Class
SortedSet Class
System.Collections Class
ArrayList
表示动态大小的对象集合,其中的对象是按顺序列出的
IList ICollection IEnumerable ICloneable
BitA...
分类:
其他好文 时间:
2014-06-20 10:13:11
阅读次数:
190
1 /* 2 Design and implement a data structure
for Least Recently Used (LRU) cache. It should support the following operations:
get and set. 3 ...
分类:
其他好文 时间:
2014-06-11 13:08:46
阅读次数:
297
sharepoint学习笔记汇总http://blog.csdn.net/qq873113580/article/details/20390149using
System;using System.Collections.Generic;using Microsoft.SharePoint;usin...
分类:
其他好文 时间:
2014-06-11 12:46:01
阅读次数:
281
一段清理缓存的代码如下:dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,0),
^{ NSString*cachPath = [NSSearchPathForDirectoriesInD...
分类:
其他好文 时间:
2014-06-11 12:04:30
阅读次数:
183
队列,当进行多线程编程的时候,很多时候可能会用到,队列是先进先出的,我们可以将要执行的任务放置在队列内缓存起来,当线程池中线程可以使用的时候,我们就从队列中获取一个任务执行。。当前是一个队列的简单例子。package
com.chen.queue;import java.util.HashMap;i...
分类:
其他好文 时间:
2014-06-11 11:56:53
阅读次数:
183
原题地址:https://oj.leetcode.com/problems/powx-n/题意:Implement
pow(x,n).解题思路:求幂函数的实现。使用递归,类似于二分的思路,解法来自Mark Allen Weiss的《数据结构与算法分析》。代码:class
Solution: #...
分类:
编程语言 时间:
2014-06-11 08:59:33
阅读次数:
317
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input ca...
分类:
其他好文 时间:
2014-06-07 12:21:30
阅读次数:
284
题目链接Implement next permutation, which rearranges
numbers into the lexicographically next greater permutation of numbers.If such
arrangement is not pos...
分类:
其他好文 时间:
2014-06-07 11:10:30
阅读次数:
212
要求Implement pow(x,n)解1. 特例n=0, 直接返回1n=1, 直接返回xn 0 ?
n : -n);pow(x, index) = (index %2==1 ? pow(x, index/2)*x : pow(x,
index/2));继续优化pow(x, index) = (i...
分类:
其他好文 时间:
2014-06-06 18:40:43
阅读次数:
180
Implement
pow(x,n).要点:1、注意n是正数还是负数2、当n是负数时,注意n最小值时的处理方法:INT_MIN的绝对值比INT_MAX大1;3、当n为0时,任何非零实数的0次方都是14、尽量使用移位运算来代替除法运算,加快算法执行的速度。5、x取值为0时,0的正数次幂是1,而负数次幂...
分类:
其他好文 时间:
2014-06-06 15:52:27
阅读次数:
274