c*w
2 楼
请问一道题,我的程序就是不能全过large test case。
代码如下:
public class Solution {
public boolean isPalindrome(String s) {
// Start typing your Java solution below
// DO NOT write main() function
if (s == null) {
return false;
}
if (s.length() == 0) {
return true;
}
s = s.toLowerCase();
int start = 0;
int end = s.length() - 1;
while (start <= end) {
char first = s.charAt(start);
char second = s.charAt(end);
if (!isValid(first)) {
start ++;
} else if (!isValid(second)) {
end --;
} else {
if (first != second) {
return false;
}
start ++;
end --;
}
}
return true;
}
public boolean isValid(char ch) {
return ((ch <= 'z' && ch >= 'a') || (ch > '1' && ch < '9'));
}
}
代码如下:
public class Solution {
public boolean isPalindrome(String s) {
// Start typing your Java solution below
// DO NOT write main() function
if (s == null) {
return false;
}
if (s.length() == 0) {
return true;
}
s = s.toLowerCase();
int start = 0;
int end = s.length() - 1;
while (start <= end) {
char first = s.charAt(start);
char second = s.charAt(end);
if (!isValid(first)) {
start ++;
} else if (!isValid(second)) {
end --;
} else {
if (first != second) {
return false;
}
start ++;
end --;
}
}
return true;
}
public boolean isValid(char ch) {
return ((ch <= 'z' && ch >= 'a') || (ch > '1' && ch < '9'));
}
}
p*e
3 楼
1. Nikkor 35mm AF-D Lens with metal hood. metal hood上有一个小坑。
$200
2. Voigtlander 20mm SL-II for Nikon with box.
$400
SOLD. Zeiss ZF 35mm f/2 for Nikon with box and everything
$650
SOLD. Canon 85mm II f/1.2 L with box hood pouch and everything
$1600
5. Zeiss ZF 100mm f/2 for Nikon with box and everything
$1150
价格一律不包含运费
我在NYC
谢谢
$200
2. Voigtlander 20mm SL-II for Nikon with box.
$400
SOLD. Zeiss ZF 35mm f/2 for Nikon with box and everything
$650
SOLD. Canon 85mm II f/1.2 L with box hood pouch and everything
$1600
5. Zeiss ZF 100mm f/2 for Nikon with box and everything
$1150
价格一律不包含运费
我在NYC
谢谢
c*w
5 楼
471/475
有四个没过,但是看不到具体的cases。
大牛帮我看一眼,程序哪里有问题?
谢谢
有四个没过,但是看不到具体的cases。
大牛帮我看一眼,程序哪里有问题?
谢谢
f*y
6 楼
文少发飙了?
【在 p********e 的大作中提到】
: 1. Nikkor 35mm AF-D Lens with metal hood. metal hood上有一个小坑。
: $200
: 2. Voigtlander 20mm SL-II for Nikon with box.
: $400
: SOLD. Zeiss ZF 35mm f/2 for Nikon with box and everything
: $650
: SOLD. Canon 85mm II f/1.2 L with box hood pouch and everything
: $1600
: 5. Zeiss ZF 100mm f/2 for Nikon with box and everything
: $1150
【在 p********e 的大作中提到】
: 1. Nikkor 35mm AF-D Lens with metal hood. metal hood上有一个小坑。
: $200
: 2. Voigtlander 20mm SL-II for Nikon with box.
: $400
: SOLD. Zeiss ZF 35mm f/2 for Nikon with box and everything
: $650
: SOLD. Canon 85mm II f/1.2 L with box hood pouch and everything
: $1600
: 5. Zeiss ZF 100mm f/2 for Nikon with box and everything
: $1150
h*s
9 楼
code呐?
c*w
10 楼
(ch >= '1' && ch <= '9')
1到9之间,改过了,变成473/475
1到9之间,改过了,变成473/475
s*s
12 楼
isvalid 里面 A-Z也应该是valid的吧
c*d
13 楼
你买百微纯粹为了resale啊js
【在 p********e 的大作中提到】
: 1. Nikkor 35mm AF-D Lens with metal hood. metal hood上有一个小坑。
: $200
: 2. Voigtlander 20mm SL-II for Nikon with box.
: $400
: SOLD. Zeiss ZF 35mm f/2 for Nikon with box and everything
: $650
: SOLD. Canon 85mm II f/1.2 L with box hood pouch and everything
: $1600
: 5. Zeiss ZF 100mm f/2 for Nikon with box and everything
: $1150
【在 p********e 的大作中提到】
: 1. Nikkor 35mm AF-D Lens with metal hood. metal hood上有一个小坑。
: $200
: 2. Voigtlander 20mm SL-II for Nikon with box.
: $400
: SOLD. Zeiss ZF 35mm f/2 for Nikon with box and everything
: $650
: SOLD. Canon 85mm II f/1.2 L with box hood pouch and everything
: $1600
: 5. Zeiss ZF 100mm f/2 for Nikon with box and everything
: $1150
c*w
20 楼
Thanks. :D
n*e
22 楼
财主。
s*g
29 楼
85L 蛮公道的, if brand new, heart beating
【在 p********e 的大作中提到】
: 1. Nikkor 35mm AF-D Lens with metal hood. metal hood上有一个小坑。
: $200
: 2. Voigtlander 20mm SL-II for Nikon with box.
: $400
: SOLD. Zeiss ZF 35mm f/2 for Nikon with box and everything
: $650
: SOLD. Canon 85mm II f/1.2 L with box hood pouch and everything
: $1600
: 5. Zeiss ZF 100mm f/2 for Nikon with box and everything
: $1150
【在 p********e 的大作中提到】
: 1. Nikkor 35mm AF-D Lens with metal hood. metal hood上有一个小坑。
: $200
: 2. Voigtlander 20mm SL-II for Nikon with box.
: $400
: SOLD. Zeiss ZF 35mm f/2 for Nikon with box and everything
: $650
: SOLD. Canon 85mm II f/1.2 L with box hood pouch and everything
: $1600
: 5. Zeiss ZF 100mm f/2 for Nikon with box and everything
: $1150
S*M
31 楼
何必呢
整天折腾来折腾去,都是给ebay和邮局打工
【在 p********e 的大作中提到】
: 1. Nikkor 35mm AF-D Lens with metal hood. metal hood上有一个小坑。
: $200
: 2. Voigtlander 20mm SL-II for Nikon with box.
: $400
: SOLD. Zeiss ZF 35mm f/2 for Nikon with box and everything
: $650
: SOLD. Canon 85mm II f/1.2 L with box hood pouch and everything
: $1600
: 5. Zeiss ZF 100mm f/2 for Nikon with box and everything
: $1150
整天折腾来折腾去,都是给ebay和邮局打工
【在 p********e 的大作中提到】
: 1. Nikkor 35mm AF-D Lens with metal hood. metal hood上有一个小坑。
: $200
: 2. Voigtlander 20mm SL-II for Nikon with box.
: $400
: SOLD. Zeiss ZF 35mm f/2 for Nikon with box and everything
: $650
: SOLD. Canon 85mm II f/1.2 L with box hood pouch and everything
: $1600
: 5. Zeiss ZF 100mm f/2 for Nikon with box and everything
: $1150
G*o
33 楼
85L 1500,出吗?
p*e
38 楼
4 is sold
1. Nikkor 35mm AF-D Lens with metal hood. metal hood上有一个小坑。
$200
2. Voigtlander 20mm SL-II for Nikon with box.
$400
3. Zeiss ZF 35mm f/2 for Nikon with box and everything
$650
4. Canon 85mm II f/1.2 L with box hood pouch and everything
$1600
5. Zeiss ZF 100mm f/2 for Nikon with box and everything
$1150
价格一律不包含运费
我在NYC
谢谢
【在 p********e 的大作中提到】
: 1. Nikkor 35mm AF-D Lens with metal hood. metal hood上有一个小坑。
: $200
: 2. Voigtlander 20mm SL-II for Nikon with box.
: $400
: SOLD. Zeiss ZF 35mm f/2 for Nikon with box and everything
: $650
: SOLD. Canon 85mm II f/1.2 L with box hood pouch and everything
: $1600
: 5. Zeiss ZF 100mm f/2 for Nikon with box and everything
: $1150
1. Nikkor 35mm AF-D Lens with metal hood. metal hood上有一个小坑。
$200
2. Voigtlander 20mm SL-II for Nikon with box.
$400
3. Zeiss ZF 35mm f/2 for Nikon with box and everything
$650
4. Canon 85mm II f/1.2 L with box hood pouch and everything
$1600
5. Zeiss ZF 100mm f/2 for Nikon with box and everything
$1150
价格一律不包含运费
我在NYC
谢谢
【在 p********e 的大作中提到】
: 1. Nikkor 35mm AF-D Lens with metal hood. metal hood上有一个小坑。
: $200
: 2. Voigtlander 20mm SL-II for Nikon with box.
: $400
: SOLD. Zeiss ZF 35mm f/2 for Nikon with box and everything
: $650
: SOLD. Canon 85mm II f/1.2 L with box hood pouch and everything
: $1600
: 5. Zeiss ZF 100mm f/2 for Nikon with box and everything
: $1150
p*e
39 楼
3 IS ALSO SOLD.
【在 p********e 的大作中提到】
: 1. Nikkor 35mm AF-D Lens with metal hood. metal hood上有一个小坑。
: $200
: 2. Voigtlander 20mm SL-II for Nikon with box.
: $400
: SOLD. Zeiss ZF 35mm f/2 for Nikon with box and everything
: $650
: SOLD. Canon 85mm II f/1.2 L with box hood pouch and everything
: $1600
: 5. Zeiss ZF 100mm f/2 for Nikon with box and everything
: $1150
【在 p********e 的大作中提到】
: 1. Nikkor 35mm AF-D Lens with metal hood. metal hood上有一个小坑。
: $200
: 2. Voigtlander 20mm SL-II for Nikon with box.
: $400
: SOLD. Zeiss ZF 35mm f/2 for Nikon with box and everything
: $650
: SOLD. Canon 85mm II f/1.2 L with box hood pouch and everything
: $1600
: 5. Zeiss ZF 100mm f/2 for Nikon with box and everything
: $1150
相关阅读
【求购】70-200mm 4L IS,refurbished大师推荐的那个日本女人居然满嘴镶牙。。。[合集] 默豆不适合做老婆buy.com有球头,快装板吗?135L[KJPT]亚马逊一员工盗取16万美元电子产品 已被逮捕(图) (转载)856L有refurbished了Buy.com有ST-E3, $328老问题 50 1.4 50 1.81岁以下小孩流鼻涕感冒吃什么消炎药好?D800E 3150艾未未英语说的不错手机大家都是用unlock的?有人用过amazon payment吗?今天感受老美的地理知识差了佛爷们,新版的summilux asph 35mm 1.4buy 10xCanon又cancel我的refurb order..带着Nikon的廉价超广角18-35去湾区转悠了一个周末人类注定越来越gay