Valid Anagram
Given two strings s and t, write a function to determine if t is an anagram of s.
For example,
s = "anagram", t = "nagaram", return true.
s = "rat", t = "car", return f...
分类:
其他好文 时间:
2015-08-01 22:03:13
阅读次数:
83
题目:
There are N gas stations along a circular route, where the amount of gas at station i is gas[i].
You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from statio...
分类:
编程语言 时间:
2015-08-01 22:01:59
阅读次数:
188
题目:
Given two strings s and t, write a function to determine if t is an anagram of s.
For example,
s = "anagram", t = "nagaram", return true.
s = "rat", t = "car", return false.
Note:
Yo...
分类:
其他好文 时间:
2015-08-01 17:21:47
阅读次数:
82
Given two strings?s?and?t, write a function to determine if?t?is an anagram of?s. For example, s?= "anagram",?t?= "nagaram", return true. s?= "rat",?t?= "car", return false. Note: You ...
分类:
其他好文 时间:
2015-08-01 15:53:07
阅读次数:
173
1.为什么声明某些属性时候,一般用copy,而不用strong
@interface
Car :
NSObject
@property
(nonatomic,copy) NSString*
name;
@property (nonatomic,copy) NSArray *array;
@end
对于具有可变副本的属性我们一般声明为copy
比如说,上述name的属性...
分类:
其他好文 时间:
2015-07-29 14:12:36
阅读次数:
119
第一种方法,给car增加属性 public decimal Price { get { return _Price; } set { _Price = value; } } public string Pic...
分类:
Web程序 时间:
2015-07-28 17:22:54
阅读次数:
154
题目:
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
For example,
"A man, a plan, a canal: Panama" is a palindrome.
"race a car" ...
分类:
编程语言 时间:
2015-07-28 16:05:25
阅读次数:
138
A while ago I tried to update our BMW E61 '05 completely with Program. It stopped at the first ECU, the CAS, the car did nothing Luckily I managed to ...
分类:
其他好文 时间:
2015-07-27 18:30:54
阅读次数:
532
There areNgas stations along a circular route, where the amount of gas at stationiisgas[i].You have a car with an unlimited gas tank and it costscost[...
分类:
其他好文 时间:
2015-07-26 17:13:24
阅读次数:
112
This指针相当于当前对象
静态变量也称为类变量,生命周期跟类一样
匿名类
//Car c = new Car() ;声明了一个Car对象,名字叫c
new Car().test() ; 并没有声明对象,照样调用Car里面的函数
new Car().take() ; 每new一个Car, 就会在堆里创建一个对象,而且很多实例变量不能调用,因为没有对象。...
分类:
编程语言 时间:
2015-07-25 16:57:25
阅读次数:
205