- 博客(17)
- 资源 (2)
- 收藏
- 关注
原创 leetcode-climbStairs
You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?如题:我
2014-07-15 10:15:25
512
原创 单链表是否有环
public static boolean hasCycle(ListNode head) { int i = 0; if (head == null) { return false; } else { while (true) { head = head.next; if (head == null) { return false; }
2014-06-06 10:07:45
486
原创 insertionSort debug
void insertionSort(int a[]){for (int i = 1; i < a.length; i++) { int temp = a[i]; int j = i; for (j = i; j > 0&&temp < a[j - 1]; j--) { a[j] = a[j - 1]; } a[j] = temp; }}
2014-05-23 11:10:03
462
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人