avatar
patio dining set# Living
M*g
1
【 以下文字转载自 FleaMarket 讨论区 】
发信人: MihuEgg (小迷糊蛋), 信区: FleaMarket
标 题: 【求购】iphone 3gs nokia n97 e75 e71 blackberry
发信站: BBS 未名空间站 (Mon Aug 31 17:35:22 2009, 美东)
我想要的物品:
各种型号全新手机不限量量大优惠
brand new iphone 3gs 16gb & 32gb
brand new nokia n97 e75 e71
brand new 黑莓BlackBerry各种型号
单张面值:
599/699
可接受的价格 (required):
3gs 16gb, 640
3gs 32gb, 740
nokia n97,460
nokia e75,270
nokia e71,210
blackberry PM 型号价格数量
老相好优先,量大优惠,欢迎长期合作
物品新旧要求:
New
邮寄方式要求:
4+, My lable
4-, your lable to my address
买卖双方谁承担邮寄损失(required if n
avatar
y*m
2
简单java的,有更优化的么,thx!
private static void merge() {
Integer A[] = new Integer[] { 1, 5, 8, 14, 25 };
Integer B[] = new Integer[] { 3, 4, 7, 17, 27 };
int k = A.length + B.length;
Integer C[] = new Integer[k];
int i = 0, j = 0, m = 0;
while (m < k-1) {
if (A[i] > B[j]) {
C[m] = B[j];
j++;
} else {
C[m] = A[i];
i++;
}
log.info( " " + C[m] );
m++;
}
}
avatar
b*o
3
为啥那么贵呢,怎么就没有便宜的呢?是不是没有米的人一般不用这么奢侈的东东,所
以没有竞争呢?
avatar
g*s
4
your codes will overflow【 在 yesim (yesim) 的大作中提到: 】
avatar
H*7
5
一百来块很便宜啦。
avatar
p*y
6
为什么?看着对。

【在 g***s 的大作中提到】
: your codes will overflow【 在 yesim (yesim) 的大作中提到: 】
avatar
y*m
7
跑通的,有测试数据?

your codes will overflow【 在 yesim (yesim) 的大作中提到: 】

【在 g***s 的大作中提到】
: your codes will overflow【 在 yesim (yesim) 的大作中提到: 】
avatar
q*9
8
check if either one already empty
avatar
g*s
9
please change one line to test:
Integer B[] = new Integer[] { 3, 4, 7, 17, 27,30 };

【在 y***m 的大作中提到】
: 跑通的,有测试数据?
:
: your codes will overflow【 在 yesim (yesim) 的大作中提到: 】

avatar
p*y
10
同意,呵呵,2个都要check是否empty。
empty之后就是copy另外一个剩下的。

【在 q*****9 的大作中提到】
: check if either one already empty
avatar
n*z
11
如果第一个数组跑晚了。你的循环还会去比较下一组。
你必须检查index或者在数组的最后设置无限大的最后一个元素

【在 p****y 的大作中提到】
: 为什么?看着对。
avatar
y*m
12
哦... 这样可以?
thx!
private static void merge2() {
Integer B[] = new Integer[] { 1, 3, 8, 14, 25 };
Integer A[] = new Integer[] { 3, 4, 7, 17, 27, 30 };
int k = A.length + B.length;
Integer C[] = new Integer[k];
int i = 0, j = 0, m = 0;
while (m < k - 1) {
if (j < B.length - 1 && (A[i] > B[j] || i > A.length - 2)) {
C[m] = B[j];
j++;
} else {
C[m] = A[i];
i++;
}
log.info(" " + C[m]);
m++;
}
}

【在 g***s 的大作中提到】
: please change one line to test:
: Integer B[] = new Integer[] { 3, 4, 7, 17, 27,30 };

avatar
g*s
13
try
Integer A[] = new Integer[]{1};

【在 y***m 的大作中提到】
: 哦... 这样可以?
: thx!
: private static void merge2() {
: Integer B[] = new Integer[] { 1, 3, 8, 14, 25 };
: Integer A[] = new Integer[] { 3, 4, 7, 17, 27, 30 };
: int k = A.length + B.length;
: Integer C[] = new Integer[k];
: int i = 0, j = 0, m = 0;
: while (m < k - 1) {
: if (j < B.length - 1 && (A[i] > B[j] || i > A.length - 2)) {

avatar
p*y
14
呵呵。

【在 g***s 的大作中提到】
: try
: Integer A[] = new Integer[]{1};

avatar
r*y
15
do not use Integer
use int instead
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。