右键点击项目选择Properties,把Libraries下Android x.x给remove了。 点右侧的Add Library,选择JRE System Library然后next,重新指定JRE。 确定之后右键项目选择Android Tools下Fix Project P...
分类:
其他好文 时间:
2015-06-16 18:38:09
阅读次数:
107
problem:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one uniqu...
分类:
其他好文 时间:
2015-06-16 18:32:29
阅读次数:
113
Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ord...
分类:
其他好文 时间:
2015-06-16 18:25:09
阅读次数:
110
Write a program to find the node at which the intersection of two singly linked lists begins.
For example, the following two linked lists:
A: a1 → a2
↘...
分类:
其他好文 时间:
2015-06-16 17:01:18
阅读次数:
87
有时候我们会在代码中加入//TODO: ,或者//!!!, 或者//???等注释信息,风格各异,那么怎么让Xcode帮助我们识别这些注释呢?步骤如下:
TARGETS–>(项目名称)–>Build Phases–>选择左上角”+”符号,添加”New Run Script Phase“
在脚本框中添加
KEYWORDS=”TODO:|FIXME:|\?\?\?:|!!!:”
find “${SRC...
分类:
其他好文 时间:
2015-06-16 16:53:01
阅读次数:
171
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete at most k transactions.
Note:
You may no...
分类:
其他好文 时间:
2015-06-16 16:51:37
阅读次数:
107
因为按照题意,num[0]是大于左边的不存在的那个元素的,num[size-1]也是大于右边那个不存在的元素的,假如不存在,那么就会有num[0]右为false。注意:题目中说了,返回任意一个峰值都行,所以,能用二分搜索,如果要返回第一个峰值的话,二分搜索是不行的。class Solution {p...
分类:
其他好文 时间:
2015-06-16 12:35:08
阅读次数:
96
Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.强行解:inline bool valueSame(double a, double b) { re...
分类:
其他好文 时间:
2015-06-16 12:27:10
阅读次数:
86
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete at most two transactions.
Note:
You ma...
分类:
其他好文 时间:
2015-06-16 11:05:45
阅读次数:
116
Rectangle Area问题:Find the total area covered by tworectilinearrectangles in a2Dplane.Each rectangle is defined by its bottom left corner and top right...
分类:
其他好文 时间:
2015-06-16 10:59:35
阅读次数:
81