码迷,mamicode.com
首页 >  
搜索关键字:first firstordefault    ( 14152个结果
Android开发之自定义Dialog二次打开报错问题解决
之前自定义了一个AlertDialog对话框,第一次点击时正常,但第二次调用时会出现错误:java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.              关于这个错误纠结了我...
分类:移动开发   时间:2014-06-28 07:28:39    阅读次数:278
POJ1026 Cipher 【polya】
This question is not so difficult. First,my thoughts were we should use a lot of code to find out the loop block,but there is no need to do that . you just need to get every new position of char in ...
分类:其他好文   时间:2014-06-27 23:39:44    阅读次数:293
Leetcode: First Missing Positive
Given an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2.Your algorithm sho...
分类:其他好文   时间:2014-06-27 22:24:34    阅读次数:346
[leetcode] First Missing Positive
Given an unsorted integer array, find the first missing positive integer.
分类:其他好文   时间:2014-06-27 12:39:02    阅读次数:185
剑指offer (42) 单词翻转
题目:输入一个英文句子,翻转句子中单词的顺序,但单词内字符顺序不变题解分析:两次翻转:第一次翻转整个句子第二次解析出每个单词并将单词翻转void reverse(char* first, char* last){ assert(first != NULL && last != NULL); ...
分类:其他好文   时间:2014-06-27 12:04:29    阅读次数:174
剑指offer (41) 有序数组数字之和
题目:输入一个递增排序的数组和一个数字target,在数组中查找两个数使得它们的和正好是target题解分析:一提到有序数组,应该立马联想到 二分查找因为数组已经有序了,我们可以设置两个游标first和last,下标first指向 0, last指向 size() - 1, 然后相加如果相加和 大于...
分类:其他好文   时间:2014-06-27 11:53:40    阅读次数:210
[leetcode] Jump Game II
Given an array of non-negative integers, you are initially positioned at the first index of the array.
分类:其他好文   时间:2014-06-27 11:51:49    阅读次数:213
[leetcode] Jump Game
Given an array of non-negative integers, you are initially positioned at the first index of the array.
分类:其他好文   时间:2014-06-27 11:42:04    阅读次数:146
Head First装饰模式(Decorator)
装饰者模式是动态的将责任附加到另一个对象上,由这个对象负责;这个装饰与被装饰的组件接口一致,因此对使用该组件的客户透明;其中的关键点是装饰者可以在所委托被装饰者的行为之前和之后,加上自己的行为,已达到特点的目的。 代码如下: -------------Component //装饰者模式一般使用抽象类 public abstract class Beverage {...
分类:其他好文   时间:2014-06-27 09:09:56    阅读次数:269
First Missing Positive
题目 Given an unsorted integer array, find the first missing positive integer. For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2. Your algorithm should run in O(n) time and u...
分类:其他好文   时间:2014-06-27 08:30:30    阅读次数:202
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!