cKK

............当你觉得自己很辛苦,说明你正在走上坡路.............坚持做自己懒得做但是正确的事情,你就能得到别人想得到却得不到的东西............

导航

01 2016 档案

摘要:Implement pow(x, n). double sum = 1; if (n > 0) { while ((n--) > 0) sum *= x; return sum; } else if (n < 0) { while ((n++) < 0) sum /= x; } return sum 阅读全文

posted @ 2016-01-27 16:31 cKK 阅读(244) 评论(0) 推荐(0)

摘要:Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must close in the correct ... 阅读全文

posted @ 2016-01-27 13:16 cKK 阅读(200) 评论(0) 推荐(0)

摘要:Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a... 阅读全文

posted @ 2016-01-26 23:36 cKK 阅读(103) 评论(0) 推荐(0)

摘要: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./** * Def... 阅读全文

posted @ 2016-01-26 22:11 cKK 阅读(189) 评论(0) 推荐(0)

摘要:Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After ... 阅读全文

posted @ 2016-01-26 20:47 cKK 阅读(160) 评论(0) 推荐(0)

摘要:Write a function to find the longest common prefix string amongst an array of strings.Subscribe to see which companies asked this question }public cl... 阅读全文

posted @ 2016-01-26 15:11 cKK 阅读(154) 评论(0) 推荐(0)

摘要: 阅读全文

posted @ 2016-01-25 22:38 cKK 阅读(126) 评论(0) 推荐(0)

摘要:/* Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes?... 阅读全文

posted @ 2016-01-22 23:37 cKK 阅读(137) 评论(0) 推荐(0)

摘要:Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.Have you thought about this?Here are s... 阅读全文

posted @ 2016-01-22 00:43 cKK 阅读(164) 评论(0) 推荐(0)

摘要:Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.Example:Given nums = [-2, 0, 3, -5, 2, -1]sumRang... 阅读全文

posted @ 2016-01-21 16:08 cKK 阅读(206) 评论(0) 推荐(0)

摘要:/*Given an integer, write a function to determine if it is a power of three.Follow up:Could you do it without using any loop / recursion?*/public clas... 阅读全文

posted @ 2016-01-21 14:35 cKK 阅读(136) 评论(0) 推荐(0)

摘要:Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the... 阅读全文

posted @ 2016-01-20 22:01 cKK 阅读(146) 评论(0) 推荐(0)

摘要:单例设计模式: http://blog.csdn.net/jason0539/article/details/23297037 工厂设计模式: http://blog.csdn.net/hguisu/article/details/7505909 链表的反转:递归与非递归 http://www.cn 阅读全文

posted @ 2016-01-18 19:56 cKK 阅读(161) 评论(0) 推荐(0)

摘要:equals和==的区别 Java中equals和==的区别java中的数据类型,可分为两类: 1.基本数据类型,也称原始数据类型。byte,short,char,int,long,float,double,boolean 他们之间的比较,应用双等号(==),比较的是他们的值。 2.复合数据类型(类 阅读全文

posted @ 2016-01-12 21:47 cKK 阅读(175) 评论(0) 推荐(0)

摘要:创建和销毁对象1.考虑用静态工厂方式代替构造器(P7)static factory method:类提供一个公有的返回实例的静态方法。http://blog.csdn.net/mingyunduoshou/article/details/6149758优点:有名称;不必在每次调用他们的时候都新建一个... 阅读全文

posted @ 2016-01-12 21:46 cKK 阅读(269) 评论(0) 推荐(0)

摘要:一、ServletContext对象(Context域)1.服务器启动的时候,会为每一个webapp创建一个对应的ServletContext对象,他代表该webapp,当服务器停止或将webapp从服务器中移除的时候,就会销毁对应的ServletContext对象2.查阅ServletContex... 阅读全文

posted @ 2016-01-04 12:46 cKK 阅读(1142) 评论(0) 推荐(0)