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" is not a ...
分类:
其他好文 时间:
2015-05-07 16:48:34
阅读次数:
78
题意:给出n个点,m条路,每条路用5个整数表示u,v,a,b,tu表示这条路的起点,v表示终点,a表示打开时间,b表示关闭时间,t表示通过这条道路需要的时间看的紫书,因为边权不再仅仅是路上的时间,还需要处理一下是否需要等待如果不需要等待的话,这条路上的权值就为t如果需要等待的话,这条路的权值就为t+...
分类:
其他好文 时间:
2015-05-07 00:38:23
阅读次数:
141
class Solution {public: string addBinary(string a, string b) { int car = 0; int cur_a = a.length()-1; int cur_b = b.length()-1...
分类:
其他好文 时间:
2015-05-07 00:22:29
阅读次数:
173
先定义一个类,名字为Car,实现了两个构造方法如下: 1 public class Car { 2 3 //这里就是一个构造方法,不能有返回值类型, 4 public Car(){ 5 6 System.out.println("Car的构...
分类:
编程语言 时间:
2015-05-06 14:52:13
阅读次数:
187
1.题目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" is not a pali...
分类:
其他好文 时间:
2015-05-01 18:46:29
阅读次数:
129
problem:
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 trave...
分类:
其他好文 时间:
2015-04-29 11:36:38
阅读次数:
121
Description
You are given a car odometer which displays the miles traveled as an integer. The odometer has a defect, however: it proceeds from the digit 1 to the digit 3, from the digit 4 to the di...
分类:
其他好文 时间:
2015-04-28 16:16:02
阅读次数:
167
oc中只能使用指针来间接操作对象。例如 为对象属性赋初值。一个指针占8个字节。[Car new]在内存中会分配两块内存地址,一块是类,包含方法,一块是新new出来的对象内存,包含对象的公共属性。每个对象都有一个isa成员变量,指向类的内存地址。 成员变量是每个对象私有的,方法列表是在类里面 是公有的...
分类:
其他好文 时间:
2015-04-27 23:06:35
阅读次数:
147
father = { house=1}son = { car=1}setmetatable(son, father) --把son的metatable设置为fatherprint(son.house)输出的结果是nil,但如果把代码改为father = { house=1}fath...
分类:
其他好文 时间:
2015-04-27 12:48:41
阅读次数:
105
1.只要new后面调用了函数就是创建类的实例参考代码如下 1 var CAR=function(name,color)//构造函数 2 { 3 var lunzi=4;//私有属性 4 //实例化属性、方法、函数(公开的属性公开的方法) 5 this.name=name; 6 thi...
分类:
编程语言 时间:
2015-04-27 02:01:30
阅读次数:
173