自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Wu_George的专栏

不相信所谓的运气、天赋、捷径,努力的程度压根就没到拼天赋的时候.

  • 博客(13)
  • 资源 (1)
  • 收藏
  • 关注

原创 Sqrt(x)

Implement int sqrt(int x).Compute and return the square root of x.public class Solution { public int sqrt(int x) { if(x == 0 || x==1) return x; int low = 1, high =

2014-05-19 23:06:13 686

原创 【DP】Climbing Stairs

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?public class Solution {

2014-05-19 21:54:29 559

原创 Plus One

Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at the head of the list.public class Solutio

2014-05-19 21:03:01 503

原创 Add Binary

Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".public class Solution { public String addBinary(String a, String b) {

2014-05-19 20:49:12 573

原创 【链表】Merge Two Sorted Lists

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists./** * Definition for singly-linked list. * public c

2014-05-19 20:21:22 469

原创 【区间合并】Insert Interval

Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially sorted according to their start times.E

2014-05-19 11:43:47 522

原创 【区间合并】Merge Intervals

/** * Definition for an interval. * public class Interval { * int start; * int end; * Interval() { start = 0; end = 0; } * Interval(int s, int e) { start = s; end = e; } * } */

2014-05-19 11:32:57 566

原创 Length of Last Word

Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word does not exist, return 0.Note: A word is

2014-05-18 16:59:37 512

原创 Spiral Matrix II

Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.For example,Given n = 3,You should return the following matrix:[ [ 1, 2, 3 ], [ 8, 9, 4 ], [

2014-05-18 16:43:14 405

原创 【排列】Permutation Sequence

The set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence (ie, for n = 3):"123""132""213""231""3

2014-05-18 16:23:55 458

原创 【链表】Rotate List

Given a list, rotate the list to the right by k places, where k is non-negative.For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3->NULL.链表右移K位public class Solution {

2014-05-15 22:42:13 515

原创 【链表】删除链表中连续重复的节点

MS的一个面试题,删除链表中连续重复的节点,如1,2,2,2,3

2014-05-15 21:59:43 672

原创 计算阶乘n!末尾的0的个数

思路参考:http://www.oschina.net/code/snippet_112092_9454

2014-05-04 22:41:44 575

自动定时关机工具,为自己省时省电

自动 定时的关机 当你下载时就不要等下载完再自己关机了

2009-12-02

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除