Redian新闻
>
ATT more 650 把买的手机退了
avatar
ATT more 650 把买的手机退了# Money - 海外理财
l*n
1
for 16G, 200+325+30+26+20(one month service fee at least 20)=601$
almost the price for ipad 3G 16G
not many ppl will buy
avatar
b*m
2
凭心而论我遇到的三个钟还有不少不错的,只是我现在东家太烂了
删除一个arraylist的所有负数给俺这样的代码,和O(1)的复杂度
就这样头和头的头还要给一个junior level的offer,尼玛都10年java经验了。
avatar
J*o
3
手机有黑死点,买的是返修机,店家无法换,但是可以退货。是att老用户,现在是用
够了15天,650也返了。如果把手机退了会如何呢?官网上写的是Return/Restocking:
If you return the phone within 14 days, you will not be eligible for the
credit on the returned phone. Restocking fee up to $35 applies.
有人有数据点,650会被收回吗?
avatar
h*a
4
what's 325/30/26/20?

【在 l******n 的大作中提到】
: for 16G, 200+325+30+26+20(one month service fee at least 20)=601$
: almost the price for ipad 3G 16G
: not many ppl will buy

avatar
m*j
5
这是种族之争,跟个人的好差没冠希。

【在 b**m 的大作中提到】
: 凭心而论我遇到的三个钟还有不少不错的,只是我现在东家太烂了
: 删除一个arraylist的所有负数给俺这样的代码,和O(1)的复杂度
: 就这样头和头的头还要给一个junior level的offer,尼玛都10年java经验了。

avatar
d*n
6
应该没问题哈呵呵
或者你换个别的机器,再加点钱。
换那种能退的。
三换两换的把鬼子晃晕。
然后再退就没有然后哈呵呵。

【在 J*o 的大作中提到】
: 手机有黑死点,买的是返修机,店家无法换,但是可以退货。是att老用户,现在是用
: 够了15天,650也返了。如果把手机退了会如何呢?官网上写的是Return/Restocking:
: If you return the phone within 14 days, you will not be eligible for the
: credit on the returned phone. Restocking fee up to $35 applies.
: 有人有数据点,650会被收回吗?

avatar
w*d
7
ETF+ACTIVATION+MONTHLY FEE?

【在 h********a 的大作中提到】
: what's 325/30/26/20?
avatar
h*d
8
上面为啥要给offer呢?里面有老印强推?

【在 b**m 的大作中提到】
: 凭心而论我遇到的三个钟还有不少不错的,只是我现在东家太烂了
: 删除一个arraylist的所有负数给俺这样的代码,和O(1)的复杂度
: 就这样头和头的头还要给一个junior level的offer,尼玛都10年java经验了。

avatar
i*y
9
你的650返的好快,我怎么记得你比我买手机还晚呢。
你是11月开户手机的,现在就已经返650了?

【在 J*o 的大作中提到】
: 手机有黑死点,买的是返修机,店家无法换,但是可以退货。是att老用户,现在是用
: 够了15天,650也返了。如果把手机退了会如何呢?官网上写的是Return/Restocking:
: If you return the phone within 14 days, you will not be eligible for the
: credit on the returned phone. Restocking fee up to $35 applies.
: 有人有数据点,650会被收回吗?

avatar
h*a
10
一条线325 etf?
以前是175吧?

【在 w********d 的大作中提到】
: ETF+ACTIVATION+MONTHLY FEE?
avatar
l*a
11
他这个code work吗?去eclipse运行一下看看
input不需要判空吗?
参数是不是定义成List更合适一点
remove的参数不转成Obejct就变成了remove(index)了吧

【在 b**m 的大作中提到】
: 凭心而论我遇到的三个钟还有不少不错的,只是我现在东家太烂了
: 删除一个arraylist的所有负数给俺这样的代码,和O(1)的复杂度
: 就这样头和头的头还要给一个junior level的offer,尼玛都10年java经验了。

avatar
l*n
12
ETF+data plan+activation+montly fee(usually more)

【在 h********a 的大作中提到】
: what's 325/30/26/20?
avatar
b*m
13
我觉得是公司烂,只招contractor
头是中国人,头的头是老美。

【在 h*d 的大作中提到】
: 上面为啥要给offer呢?里面有老印强推?
avatar
c*y
14
没有no commitment的price?

【在 l******n 的大作中提到】
: for 16G, 200+325+30+26+20(one month service fee at least 20)=601$
: almost the price for ipad 3G 16G
: not many ppl will buy

avatar
l*a
15
问题是这code压根不work
remove后size变了,index变了,更不要说现在直接call list.remove(-*)了
直接就indexOutOfBoundsException了

【在 b**m 的大作中提到】
: 我觉得是公司烂,只招contractor
: 头是中国人,头的头是老美。

avatar
w*d
16
恩,刚涨价了,呵呵,让你们不道德,哈哈

【在 h********a 的大作中提到】
: 一条线325 etf?
: 以前是175吧?

avatar
e*3
17
这是错的实现,因为删除以后后面的元素就往前提了,这样i++以后其实跳过了一个元
素。。。

【在 b**m 的大作中提到】
: 凭心而论我遇到的三个钟还有不少不错的,只是我现在东家太烂了
: 删除一个arraylist的所有负数给俺这样的代码,和O(1)的复杂度
: 就这样头和头的头还要给一个junior level的offer,尼玛都10年java经验了。

avatar
g*j
18
老大,你怎么不算税啊

【在 l******n 的大作中提到】
: for 16G, 200+325+30+26+20(one month service fee at least 20)=601$
: almost the price for ipad 3G 16G
: not many ppl will buy

avatar
x*o
19
老中fresh比他强的多的是吧,为什么非给烙印OFFER?
avatar
l*n
20
en plus 10% tax

【在 g****j 的大作中提到】
: 老大,你怎么不算税啊
avatar
e*3
21
communication skill.

【在 x****o 的大作中提到】
: 老中fresh比他强的多的是吧,为什么非给烙印OFFER?
avatar
g*x
22
成本我们小护士不care 只要利润行就上
avatar
e*3
23
+1,这三哥的基本功太不扎实了,还敢说自己写过10年Java。

【在 l*****a 的大作中提到】
: 问题是这code压根不work
: remove后size变了,index变了,更不要说现在直接call list.remove(-*)了
: 直接就indexOutOfBoundsException了

avatar
w*a
24
什么是etf,刚刚想自己in 一个用呢,原来就是att的
avatar
x*o
25

关键是头有一个是老中,那么多老中找工作,junior一抓一把,给个老中就不行啊

【在 e********3 的大作中提到】
: communication skill.
avatar
y*u
26
我也是这个意思.大神们贴开盘价吧...

【在 g****x 的大作中提到】
: 成本我们小护士不care 只要利润行就上
avatar
e*3
27
头是中国人还招这么烂的阿三真心说不过去。

【在 x****o 的大作中提到】
:
: 关键是头有一个是老中,那么多老中找工作,junior一抓一把,给个老中就不行啊

avatar
f*k
28
algee
只要国内没货源就行
就怕hk的上货了,那样偶们还不如从hk买个呢
etf 变325了嘛
还真没注意

【在 g****x 的大作中提到】
: 成本我们小护士不care 只要利润行就上
avatar
s*p
29
复杂度是指空间吧?

【在 b**m 的大作中提到】
: 凭心而论我遇到的三个钟还有不少不错的,只是我现在东家太烂了
: 删除一个arraylist的所有负数给俺这样的代码,和O(1)的复杂度
: 就这样头和头的头还要给一个junior level的offer,尼玛都10年java经验了。

avatar
J*u
30
ETF= early termination fee

【在 w****a 的大作中提到】
: 什么是etf,刚刚想自己in 一个用呢,原来就是att的
avatar
h*d
31
确实说不过去

【在 e********3 的大作中提到】
: 头是中国人还招这么烂的阿三真心说不过去。
avatar
T*u
32
要从后往前吧
avatar
j*e
33
连我这不写代码的都一下子就知道问题了,把这个offer给我吧。。。。。

【在 l*****a 的大作中提到】
: 问题是这code压根不work
: remove后size变了,index变了,更不要说现在直接call list.remove(-*)了
: 直接就indexOutOfBoundsException了

avatar
r*c
34
arraylist 还remove啊,马上要改呀,linkedlist
avatar
l*s
35

从前往后应该也行吧,就是遇到负数的时候index得退一个

【在 T*****u 的大作中提到】
: 要从后往前吧
avatar
G*C
36
Time O(n), space O(1)
ArrayList removeNegative(ArrayList a) {
if (a == null)
return a;
int nextNegative = 0, nextNonNegative = 0;
while (nextNegative < a.size()) {
if (a.get(nextNegative) >= 0) {
nextNegative++;
continue;
}
nextNonNegative = Math.max(nextNonNegative, nextNegative + 1);
while (nextNonNegative < a.size() && a.get(nextNonNegative) < 0) {
nextNonNegative++;
}
if (nextNonNegative == a.size()) {
break;
} else {
int tmp = a.get(nextNegative);
a.set(nextNegative, a.get(nextNonNegative));
a.set(nextNonNegative, tmp);
nextNegative++;
nextNonNegative++;
}
}
if (nextNegative < a.size()) {
a.subList(nextNegative, a.size()).clear();
}
return a;
}
avatar
l*a
37
据信

【在 G**C 的大作中提到】
: Time O(n), space O(1)
: ArrayList removeNegative(ArrayList a) {
: if (a == null)
: return a;
: int nextNegative = 0, nextNonNegative = 0;
: while (nextNegative < a.size()) {
: if (a.get(nextNegative) >= 0) {
: nextNegative++;
: continue;
: }

avatar
G*C
38
大牛请指教!

【在 l*****a 的大作中提到】
: 据信
avatar
l*a
39
if(input==null) return null;
for(int i=input.size()-1;i>=0;i--) {
int element=input.get(i);
if(element<0) input.remove(i);
}
return input;

【在 G**C 的大作中提到】
: 大牛请指教!
avatar
G*C
40
大牛,你的版本也work,且适用于linkedlist,但remove开销有点大。
我的版本追求性能,因此复杂了些,主要针对interviewer的口味。
我还准备了一个生产代码版本,基于Guava库.
ArrayList removeNegative2(ArrayList a) {
if (a == null)
return a;
return Lists.newArrayList(Iterables.filter(a, new Predicate() {
@Override public boolean apply(Integer input) {
return input >= 0;
}
}));
}

【在 l*****a 的大作中提到】
: if(input==null) return null;
: for(int i=input.size()-1;i>=0;i--) {
: int element=input.get(i);
: if(element<0) input.remove(i);
: }
: return input;

avatar
l*1
41
这么简单的问题写这么长Code?
搞两个指针就完了吧。

【在 G**C 的大作中提到】
: Time O(n), space O(1)
: ArrayList removeNegative(ArrayList a) {
: if (a == null)
: return a;
: int nextNegative = 0, nextNonNegative = 0;
: while (nextNegative < a.size()) {
: if (a.get(nextNegative) >= 0) {
: nextNegative++;
: continue;
: }

avatar
l*a
42

=======================
这个是怎么知道的呢?
另外面试中搞那些不是通俗易懂的东西很容易悲剧的
{

【在 G**C 的大作中提到】
: 大牛,你的版本也work,且适用于linkedlist,但remove开销有点大。
: 我的版本追求性能,因此复杂了些,主要针对interviewer的口味。
: 我还准备了一个生产代码版本,基于Guava库.
: ArrayList removeNegative2(ArrayList a) {
: if (a == null)
: return a;
: return Lists.newArrayList(Iterables.filter(a, new Predicate() {
: @Override public boolean apply(Integer input) {
: return input >= 0;
: }

avatar
l*1
43
do you know how expensive remove is?

【在 l*****a 的大作中提到】
: if(input==null) return null;
: for(int i=input.size()-1;i>=0;i--) {
: int element=input.get(i);
: if(element<0) input.remove(i);
: }
: return input;

avatar
l*a
44
讲讲吧。
看起来下一个版本的java应该把它删掉了

【在 l*********1 的大作中提到】
: do you know how expensive remove is?
avatar
G*C
45
是两个指针 nextNegative 和nextNonNegative.
退出大循环后,从[nextNegative, size())都一并truncate.
请指教简化tips.

【在 l*********1 的大作中提到】
: 这么简单的问题写这么长Code?
: 搞两个指针就完了吧。

avatar
l*1
46
我不太写java code, 不过思路是这样
一个source 指针,每次加一,
一个dest 指针,只有non-negative 才加一,
从source copy 到 destination,
最后call removeRange one time.
code (c++ style) is:
source = 0;
dest = 0;
while (source < array.size()) {
if (array[source] >= 0 ){
array[dest++] = array[source];
}
++source;
}
array.removeRange(dest, source);
you should check boundary cases:
1) array is empty
2) every element is negative
3) every element s positive

【在 G**C 的大作中提到】
: 是两个指针 nextNegative 和nextNonNegative.
: 退出大循环后,从[nextNegative, size())都一并truncate.
: 请指教简化tips.

avatar
G*C
47
对,基本差不多的思路,唯一的优化是
dest永远比src大,因此每次搜索dst时候从Max(src, last dst)开始就可以了。

【在 l*********1 的大作中提到】
: 我不太写java code, 不过思路是这样
: 一个source 指针,每次加一,
: 一个dest 指针,只有non-negative 才加一,
: 从source copy 到 destination,
: 最后call removeRange one time.
: code (c++ style) is:
: source = 0;
: dest = 0;
: while (source < array.size()) {
: if (array[source] >= 0 ){

avatar
a*d
48
头是中国人还招这么烂的阿三真心说不过去。
lz 推荐个小中吧,肯定秒杀啊。

【在 b**m 的大作中提到】
: 我觉得是公司烂,只招contractor
: 头是中国人,头的头是老美。

avatar
l*1
49
dst 永远比src 小吧。
说老实话,我面试过别人,你的code 那么写肯定挂了,没有可读性
以后面试时尽量code 简洁易懂。

【在 G**C 的大作中提到】
: 对,基本差不多的思路,唯一的优化是
: dest永远比src大,因此每次搜索dst时候从Max(src, last dst)开始就可以了。

avatar
l*1
50
arraylist 里 remove 一个元素是O(N)操作。
想想为什么是O(N), 能不能做的更好。

【在 l*****a 的大作中提到】
: 讲讲吧。
: 看起来下一个版本的java应该把它删掉了

avatar
l*1
51
你东家是哪家阿?

【在 b**m 的大作中提到】
: 凭心而论我遇到的三个钟还有不少不错的,只是我现在东家太烂了
: 删除一个arraylist的所有负数给俺这样的代码,和O(1)的复杂度
: 就这样头和头的头还要给一个junior level的offer,尼玛都10年java经验了。

avatar
x*7
52
这个。。跟最后一个换一下,然后再remove最后一个就完了呗。
avatar
b*m
53
linkedlist 按照index删除也很慢。

{

【在 G**C 的大作中提到】
: 大牛,你的版本也work,且适用于linkedlist,但remove开销有点大。
: 我的版本追求性能,因此复杂了些,主要针对interviewer的口味。
: 我还准备了一个生产代码版本,基于Guava库.
: ArrayList removeNegative2(ArrayList a) {
: if (a == null)
: return a;
: return Lists.newArrayList(Iterables.filter(a, new Predicate() {
: @Override public boolean apply(Integer input) {
: return input >= 0;
: }

avatar
s*e
54
Confused... r u writing it in java?
iterator.remove will do all the tricks.
avatar
s*7
55
同意楼上,用iterator就可以了
Iterator iter = arrayList.iterator();
while(iter.hasNext())if(iter.next()<0)iter.remove();
搞什么双指针,什么遇到负的退一个都太复杂了
avatar
z*e
56
同意楼上两位,iterator是容器类需要删除元素的标准做法吧
avatar
j*x
58
哥们你不知道iterator啥东西么?。。。
这种写法评价比lz说的那个烙印还要差啊。。。

【在 G**C 的大作中提到】
: Time O(n), space O(1)
: ArrayList removeNegative(ArrayList a) {
: if (a == null)
: return a;
: int nextNegative = 0, nextNonNegative = 0;
: while (nextNegative < a.size()) {
: if (a.get(nextNegative) >= 0) {
: nextNegative++;
: continue;
: }

avatar
c*y
60
先把不是负数的copy到是负数的位置,最后把剩余的remove掉,这样应该是最快的,小
弟就在找junior的职位,可惜了一个offer,三哥们说10年工作经验的意思就是在谦虚
的说他刚毕业在找junior的工作
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。