由买买提看人间百态

topics

全部话题 - 话题: stabl
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
i****k
发帖数: 4085
1
来自主题: Automobile版 - bmw vs taurus 2死3伤
Beat officers pull man from car in SE side crash that kills 2, hurts 3
The white BMW was headed west on 100th Street and had just crossed the bridg
e when its driver apparently lost control and it began sliding sideways into
eastbound lanes, then collided with a Ford Taurus that was headed east, pol
ice said.
The two people killed were a man, 32, believed to have been driving the BMW,
and his front-seat passenger, a woman about age 27, authorities said. The d
river was declared dead at Northwest... 阅读全帖
s**********x
发帖数: 4593
2
The victim drove his black Honda Civic onto exit 41N in Jericho, L.I., about
4:15 am. and drove east into the westbound lanes.
He crashed into an oncoming silver Mercedes
The wrong-way driver died at the scene, cops said, and his passenger was
hospitalized in serious condition.
The driver of the Mercedes was hospitalized in stable condition
泥马凭啥honda车一死一重伤
奔驰才in stable condition啊
不是对撞吗
u***n
发帖数: 21026
3
我lease上总价是30079,完税后价格
SE with appearance.
买车查个5%之内我觉得问题不大,不是人人都能拿到好offer的,我倒不是说价格差距
大小。
我说的是心境,好不容易来美国,自己开始赚钱买人生第一辆车,想买个自己priority
第一的车,哪怕贵点,自己fun,会很开心,着不就是第一辆新车的好处。而且一个人
,就像多玩玩,你有家了,两部车可以开,所以租也合适,我一个人,所有都要靠他,
整个lease即不合算,又不方便。
有家的稳定,lease适合stable的,我没家的,准不定换家换工作,所以不stable,不
合适。
我之前也没有研究过,只有自己做过一次了,才会对他彻底了解,lease很多很多不方便

是3
s******4
发帖数: 1541
4
来自主题: Automobile版 - BMW M POWER EXPERIENCE 2015
TIME TO BURN SOME RUBBER.
You are invited to an exclusive two-day event at the Las Vegas Motor
Speedway. Be the first to experience the X5M and the X6M on a track along
with the entire stable of BMW M cars.
Off the track, you will be accommodated by the five star Mandarin Oriental
Hotel located on the legendary "Strip".
You'll experience Las Vegas like never before. Be the first to drive the all
-new BMW X5 M and BMW X6 M on the track of the Las Vegas Motor Speedway at
the BMW M Power Experience... 阅读全帖
l******7
发帖数: 2234
5
进一步做功课发现,3M依次有几个产品线:(低-高)
1)FX Premium Series ;
2)3M™ Color Stable;--既然有color stable系列,是不是表示FX premium系
列不能防止褪色?
3)Ceramic Series;--这个“陶瓷技术”不太懂。网上资料显示,纳米陶瓷隔热膜,
是一种汽车隔热膜。纳米陶瓷科技是采用磁控溅射工艺,用精微的纳米状陶瓷物质,取
代传统的染料和金属的工艺。应用纳米陶瓷技术制造出来的隔热膜, 可以具有传统金
属汽车膜的应有的功能,并且能克服金属膜屏蔽GPS信号的问题。就是说,这个技术主
要是提高车内的信号(手机,GPS,Radio)。
4)3M™ Crystalline;---算是Flagship product。
x****h
发帖数: 78
6
来自主题: Classified版 - Stamford downtown 2br look for roommate
Unbeatable location--close to everything/everywhere, Macy's (town center
shopping mall) just
cross the street. half minute to bus station, every bus can go to the train
station. Also has free shuttle service during on and off work hours in week
days to the station. Target is 5 min walking distance. You can live well
without car. Btw,
I have car and
can take you to shopping. If you work in New York Mid-town, this is also a
great option because lots of people commute like that. 45 mins to Grand
ce... 阅读全帖
T1
发帖数: 4732
7
看了这个新闻不敢存货了
http://www.chron.com/disp/story.mpl/metropolitan/7030096.html
One woman was killed and another is in stable condition after both were shot
during a home invasion in north Harris County around 11:30 p.m. Sunday,
according to sheriff’s deputies.
Kimberly Dodson, 34, was transported to Houston Northwest Medical Center,
where she was pronounced dead. A 50-year-old woman, whose name has not been
released, was transported to Memorial Hermann Hospital and remains in stable
condition, accord
y***r
发帖数: 16594
8
TO WHOM IT MAY CONCERN
On Saturday February 2nd I placed an order for a dell XPS 8500 computer
through amazon.com. After spending
some time reading reviews on various web sites I was confident that this was
a good choice for a desktop computer.
When the computer arrived on Tuesday February the 5th I was excited as I was
between jobs and had time to set
up my new system. Equipped with two brand new monitors from Costco, one a 32
inch TV and one a 24 inch
monitor I had the makings of the ideal com... 阅读全帖
r****9
发帖数: 147
9
I am sorry for Arty but two Sanyo freezers that my old lab used are not very
good. The system is stable but the door and sealing always have problem.
The outside of the inner doors have ice built up very quickly. We need to
clean the ice on inner door every other week. If you don't do that
frequently, the ice will make your door difficult to close. If you still try
to close, the rubber sealing will break and the door latch will be loose.
The company said it is because we open/close the freezer t... 阅读全帖
d*******l
发帖数: 2567
10
来自主题: Family版 - 说真的我其实挺理解wilson的
With due respect, I can't disagree more about marriage vs. human
nature. Yes, marriage is against human nature, at least key part of
our human nature--our natural desire to mate whoever we feel for.
Well our human nature is more complex because we also desire to have
children and that means a stable family for them to grow in. More
importantly, we desire a trust and a strong yet stable emotional
engagement at the most intimate level with others. Now we know it's
called love. Given our current so
b*****r
发帖数: 461
11
前不久记得有人在网上贴了动车上盒饭的新闻,好多人不信有这样的东西,或者觉得一
定是用了大量防腐剂。 我个人不知道动车上的盒饭质量到底如何,但这样的食品绝对
是有的。美国不太找得到盒饭,但常见的牛奶,布丁还是随处可见的(不是冷冻,冷藏
的)。 我上个星期才在costco买的 high protein shake 就是 2012 八月到期。 下面
是USDA 网上的有关类似产品的信息。
What is an MRE?
MRE stands for "Meal, Ready-to-Eat." MRE's were originally designed for the
U.S. government and have been used since the 1970's in the U.S. space
program, U.S. military, and USDA's Forest Service. The MRE package is
officially known as a tri-laminate retort pouch. It contains normal food
th... 阅读全帖
c******n
发帖数: 32
12
How do you calculate this?
80后的独生子女. 来了美国就要过5年的穷日子,5年后还是从零开始创业,稳定下来已
经差不多40岁了.
Purdue is a good school.
But if the husband has not have strong background (science or fianicial
status), forget about going abroad. plus 赡养父母, if you are not stable,
and takes 10 years to be stable, how will you manage all kind of stuff (
parents, baby, education, investment,,,,,,)?
If you like travel abroad, you could apply travel-visa, nowadays it is
easier to apply for travel visa and got approved.
Good Luck
l*******s
发帖数: 194
13
Woodside. New York City.
Newly Developed Two Bedroom Condo Apartment, separate kitchen.
Just bought from the builder, all appliances are new, no one haw lived in
before.
Big private back yard for this unit (about 500-600 Square foot), you can do
BBQ and gradening.
Private storage room in the basement.
Launry room inside the building.
Very safe and quiet.
Close to Public Transportation.
3 minutes walk to 7 Train at 69 Street, 8 minutes walk to 74 st train
station (Subway E,F,R,M,7),
5 minutes wal... 阅读全帖
c*****e
发帖数: 1106
14
来自主题: Investment版 - 这市场崩盘只是时间问题
What do people think of a good assert allocation now after a sizable run-up
in equity so far?
Personally, I don't like intermediate or long bonds here, I am a little bit
wary of int'l funds in developed markets, europe or japan. Euro and other
currencies have rebounded nicely; but in spite of whatever mandate BOE is
supposed to have, I am afraid it will have to print more money one way or
the other, so I am wondering if Euro will turn south sooner or later.
I have been rotating $ into the stable... 阅读全帖
c*****e
发帖数: 1106
15
来自主题: Investment版 - 401 fund pick请帮忙选一下
I like your picks, LZ has to decide on actual allocation though.
I think the 401K is not that bad,
Putnam Stable Value Fund 50 is a good stable value fund,
Ivy Asset Strategy Y class is a nice entry to this fund w/o a load.
brightscope.com is an informative site, thanks.
A somewhat similar site on 401K I like is fundadvice
http://www.fundadvice.com/401k-help/401k-plans/401k-help-introd
c*****e
发帖数: 1106
16
来自主题: Investment版 - 请教:退休基金的选择
Lord Abbett Developing Growth Fund is a decent fund, but this should not be your core holding. This retirement plan is outstanding with many excellent choices in both index and actively managed funds. I don't see any bond fund or MM/stable value fund. I don't like any bond fund at this point, but I hope there is a competitive MM/stable value fund where you can park some cash.
I would suggest to pick the following (index or actively managed) funds to make up your portfolio
TIAA-CREF Large-Cap Gro... 阅读全帖
r*****l
发帖数: 354
17
来自主题: Investment版 - 请教:退休基金的选择
Thanks a lot.
Did you mean to pick one from a pair and then hold multiple finds?
I didn't list the bond/MM because 42% of our current retirment amount is
already in Bond and MM. We made a bad decision and moved our money out of
growth funds to Bonds/MM when the market was almost the lowest. Once we
moved the money out, we lost courage and never moved it back to Growth fund.
Now I plan to keep them there but invest new contributions to equity fund.
楼上的楼上不知道是不是在说反话?
我们的财产大部分就是这些税前的退休金了。工作了十年多了,还有十... 阅读全帖
b******l
发帖数: 299
18
来自主题: Investment版 - 401k的问题求教
Stable value fund = bond fund
If you are retiring around 2050, you do not need stable value fund now.
c*****e
发帖数: 1106
19
来自主题: Investment版 - 请教 401k funds 组合
建议先投Putnam Stable Value Fund,你也可以直接投Vanguard Institutional
equity funds 到你能够承受的风险,我个人觉得股市年底前会很动荡,建议先存在
Stable Value Fund,股市走低时逐渐转进。不建议买Bond fund, FED QE 导致价值
严重扭曲。
T. Rowe Price Retirement 2045 Trust 也不错,但expense比较高。
既然有Vanguard Institutional class,不如自己组合。
Equity Allocation:
Total Intl : Index : MidCap : SmallCap
40% : 30% : 15% : 15%
D*****t
发帖数: 558
20
来自主题: Investment版 - 这个网站上的投资策略靠铺吗?
The Prophet in His own words:
1. Investing is not nearly as difficult as it sounds.
2. When all else fails, fall back on simplicity.
3. Time marches on. Time dramatically enhances capital accumulation as the
magic of compounding accelerates.
4. Nothing ventured, nothing gained. It pays to take reasonable interim
risks in the search for higher long-term rates of return.
5. Diversify, diversify, diversify.
6. The eternal triangle. Never forget that risk, return, and cost are the
three sides of the... 阅读全帖
n***8
发帖数: 203
21
来自主题: Investment版 - 利息上调,401K 怎样调整呢?
利息上调,401K 怎样调整呢?卖出bond fund,放到股票fund也不好, 放到stable
value fund? 没stable value fund咋办?
S**C
发帖数: 2964
22
来自主题: Investment版 - 请教Merrill Lynch的401k帐户投资选择
Agree with M., except I will not touch US small/mid cap at this point, and
will use stable value fund instead of bond index, especially if stable value
fund pay a decent yield.
a*****p
发帖数: 1285
23
来自主题: Investment版 - fedelity 401k有money market fund么?
我按照风险排序。以下是风险最低的。 这几个是你们说的money market fund么?我看
了看还是bond或者是index fund阿。这个名字有区别么?
Principal TrustSM Target Income Fund I10
Blend
Retirement Income
Risk: 4 of 10
3.95
06/30/2014
1.48
06/30/2014
-- --

Fidelity® Government Income Fund (FGOVX)
Bond
Intermediate Government
Risk: 3 of 10
2.82
06/30/2014
1.02
06/30/2014
0.88
06/30/2014
0.96
06/30/2014

Spartan® U.S. Bond Index Fund - Fidelity Advantage Class (FSITX)
Bond
Intermediate-Term Bond
Risk: 3 of 10
2.88
06/30/2014
1... 阅读全帖
g*********e
发帖数: 14401
24
来自主题: Investment版 - fidelity的401k就十来种选择吗?
还是我操作不对,miss了什么? 以前schwab起码有好几十种啊
这个选项多寡也跟employer有关么?
Bond Investments Stable Value WF STABLE VALUE
view restriction(s) %
Bond Investments Income FID TOTAL BOND %
Bond Investments Income VANG TOT BD MKT ADM %
Stock Investments Large Cap AMERICAN AMCAP R4 %
Stock Investments Large Cap SPTN 500 INDEX INST 100% %
Stock Investments Large Cap TRP EQUITY INCOME %
Stock Investments Mid-Cap COLUMBIA ACORN Z %
Stoc... 阅读全帖
c*********2
发帖数: 216
25
来自主题: Investment版 - 求401K解释
刚刚开始弄401k,但是不太懂。自己炒股过。现在不知道怎么把401K里面的钱拿来自己
炒股。
公司用的是Merrill Lynch。以下是提供的各种bond选择。
EQUITY/STOCK Symbol Current Desired
AMERICAN BALANCED FUND CL R6 RLBGX 0%
AMERICAN EURO PACIFIC RERGX 0%
BLACKROCK EQUITY INDEX FD CL M BEIMT 5%
BLACKROCK MSCI EAFE EQTY FD M BMSCT 20%
BLACKROCK RUSSELL 2000 FD M BRIFT 9%
JP MORGAN MID VALUE INST FLMVX 25%
JP MORGAN U.S. EQUITY FD CL R5 JUSRX 9%
NEUBERGER BERMAN MID CP CL R6 NRMGX 0%
O... 阅读全帖
p**5
发帖数: 2544
26
刚开Roth IRA 账户,还不知道买什么好,有类似short term fixed或者stable value
这种短期低
利息的选择可以把钱暂时放一放吗?
另外,fidelity roth IRA有类似short term fixed或者stable value这种短期低
利息的选择吗?
D*****l
发帖数: 357
27
来自主题: Investment版 - 401K 选择
麻烦大家指点下401K的选择。。。应该怎么组合呢?本人40岁。谢谢
FID CONTRAFUND K (FCNKX)
05/17/1967
Stock Investments Large Cap 10.40% 17.55% 17.24% 9.95%
HTFD DIV & GRTH R5 (HDGTX)
07/22/1996
Stock Investments Large Cap 4.26% 16.05% 15.61% 8.37%
SPTN 500 INDEX INST (FXSIX)
02/17/1988
Stock Investments Large Cap 7.40% 17.28% 17.31% 7.87%
JANUS ENTERPRISE N (JDMNX)
09/01/1992
Stock Investments Mid-Cap 13.29% 19.29% 18.77% 10.96%
JH DSCPL VAL MDCP R6 (JVMRX)
06/02/1997
Stock Investments... 阅读全帖
a******r
发帖数: 10
28
Thanks bud, so which one is the stable fund again?
Wells Fargo funds?
[在 mesocool (Joseph) 的大作中提到:]
:I posted to similar question below. IMHO, it's not the time to invest
:anymore. I would suggest 100% in stable value and you wait.
:...........
s******e
发帖数: 2181
29
来自主题: Investment版 - 请教几个关于401k的问题
1,全部转成cash/stable value,或者逐步地转过来如果你还想玩玩水的话。
2,0.18不算高。不知道vanguard的手续费如何,我们公司用的insperity,转买卖没看
到产生手续费,奇怪的是连传说中每天要扣的expense都没有(曾经全部转成cash/
stable value,每天来查发现数字不变)。我在想是不是insperity给我们选的这些基
金不需要expense或不需要我来负担expense,而如果expense涨到一定程度它们就把这
个fund换掉了。PS可选的funds每年都被换掉几个。

wave?
m******l
发帖数: 1690
30
slowly move your money out to stable value on the next bounce and put new
money into stable value.
s******e
发帖数: 2181
31
来自主题: Investment版 - 工作8年我的401k表现如何?
我现在在尝试这种操作方法:这几年来我发现每年大概发生两次大的股市调整,每次都
是回调10%左右。我尽量扩大我的储备金,即每年尽早存入比较大的一笔数字,连同全
仓存入stable value。等待回调的发生,当出现-10%的时候满仓买入stock fund,当股
市升回原来水平后则全仓卖出。一年只要操作两次,赚个20%妥妥的。那么平时那些靠
股市缓速增长带来的收益基本可以不屑
忘了补充一点:大部分时间存在stable value里面的这些时候,是不收expense cost的
。还省了一笔费用。
s******e
发帖数: 2181
32
来自主题: Investment版 - 工作8年我的401k表现如何?
我现在在尝试这种操作方法:这几年来我发现每年大概发生两次大的股市调整,每次都
是回调10%左右。我尽量扩大我的储备金,即每年尽早存入比较大的一笔数字,连同全
仓存入stable value。等待回调的发生,当出现-10%的时候满仓买入stock fund,当股
市升回原来水平后则全仓卖出。一年只要操作两次,赚个20%妥妥的。那么平时那些靠
股市缓速增长带来的收益基本可以不屑
忘了补充一点:大部分时间存在stable value里面的这些时候,是不收expense cost的
。还省了一笔费用。
m********u
发帖数: 63
33
来自主题: Investment版 - 401k 投资组合请教
有如下选择,谢谢! ER ratio都可够贵的。现在选的是TRP RETIREMENT 2050,ER
ratio = 0.75%。不知道有没有更合适的组合。
Name/Inception Date Asset Class Category Gross Expense Ratio**
Shareholder Fees
AF FUNDMNTL INV R6 (RFNGX)
08/01/1978
Stock Investments Large Cap 0.31% No additional fees apply.
ALZGI NFJ DIV VAL I (NFJEX)
05/08/2000
Stock Investments Large Cap 0.71% No additional fees apply.
MAINSTAY LG CAP GR I (MLAIX)
07/03/1995
Stock Investments Large Cap 0.74% No additional fees apply.
VANG... 阅读全帖
f*f
发帖数: 110
34
来自主题: Investment版 - 新人的Fidelity 401k咋理财,困惑
这个月刚开的fidelity 401k,应该是属于traditional 401k了,pre-tax的那种。好多
问题搞得小弟很抓狂。现一一列出,请高人回复时也请加上序号。谢谢。
1. 公司match的那部分是不是叫contributions?
2. 什么是current balance, vested balance?
3. 账户自动给买了一个叫FA ASSET MGR 20% I的东东,这个怎么样。不好的话,怎么
转成其他的项目?
4. 账户里看到holding目前购买的金额只有自己扣除的那部分金额。为什么
contributions那部分没有用来去投资呢。
5. 账户里公司投资项目不是很多,现在贴出来,大家看看怎么选,谢谢。
AM CENTURY GRTH INV
DREY BASIC S&P 500
TRP EQUITY INC ADV
Mid-Cap
AM CENT MDCPVAL INV
DREY MID CAP INDEX
FA MID CAP II I
Small Cap
FA SM CAP VAL I
FA SMALL CAP GR I
NUVEEN SM CP ID... 阅读全帖
g*******y
发帖数: 1930
35
来自主题: JobHunting版 - 微软一个面试题
hehe, at least I don't know how to merge sort in place for array.
besidse, my comment about "in place merge sort for linkedlist will not be
stable" was not true. It could be stable. That's why I edited my post and
removed that part of comment.
r*d
发帖数: 896
36
merge sort是stable的
quick sort是unstable
如果要保留原数据的顺序,要用merge sort
也有stable quick sort,不过比较复杂
y*********e
发帖数: 518
37
O(nlogn):
qsort 和 mergesort 都可以达到O(nlogn),但是 qsort 的常数因子比 mergesort 低
很多。所以,一般情况下 qsort 会更快。
O(n^2):
虽然 qsort 的最坏情况是 O(n^2),但是要达到这个最坏情况不容易。对于实现的较好
randomized qsort,达到这个最坏情况的几率接近于 1 / n^logn。这个数值是非常低
的。
stable vs unstable:
通常 qsort 的实现是 unstable的,mergesort 的实现是 stable 的。
还有一点,qsort 一般是 inplace 的,mergesort 一般的实现不是 inplace 的。
random access:
qsort 要求可以对排序对象进行 random access。对于排序主内存中的 array 就很实
用。但是,遇到排序的对象不支持 random access,那么 qosrt 就不行了。比如排序
linked list,或者做磁盘文件排序。。利用这一点,可以很容易的用 mergesort 实现
并发排序。
a*******6
发帖数: 520
38
来自主题: JobHunting版 - 从水木上看到个数组题
所谓的quicksort不stable不是说partition那一步,而是选pivot那步
一般认为的quicksort,(递归的)每次随机选一个pivot,然后partition,复杂度期
望下是O(nlogn),最坏是O(n^2),这个可能是你说的不stable
但是partition那一步肯定是O(n)的
理想情况下,如果pivot选到median,那么复杂度肯定是O(nlogn)了
有一种确定性算法可以每次以O(n)的时间选到一个pivot在median附近(至少1/3的元素
小于他,同时至少1/3的元素大于他),那么这样quicksort的复杂度最坏情况下也是O(
nlogn)了,不过实际中没太多人用这个版本,因为其实实际的performance不如那个随
机选pivot的版本
a*******6
发帖数: 520
39
来自主题: JobHunting版 - 从水木上看到个数组题
。。。确实把这里的stable搞错了,难怪lc说有swap就不stable,这是对的
w****o
发帖数: 2260
40
我觉得 你说的不对。
你去研究一下,DNF不是stable,因为它跟quicksort如出一辙,都不是stable的。
H****r
发帖数: 2801
41
If stable sorting desired then it's getting complicated. There's some
article on this:
"Stable minimum space partitioning in linear time"
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.25.555
c****x
发帖数: 15
42
这题挺难的
0,1,2肯定是value,如果直接是数组元素的话就没有必要stable了。
用到swap基本就不stable了。
S******t
发帖数: 151
43
这个就是所谓的
Dutch National Flag Problem
Dijkstra对这个问题进行过非常深入的研究
事实上现在是没有任何stable algorithm可以做到in place, linear time的
这个问题如果要求stable,事实上是无解的。

变。
l*********8
发帖数: 4642
44
这里的stable是指: “不改变原先负数和正数的排列顺序”
我估计你理解的stable是指“最差情况下,仍然有相同的时间复杂度”。
s******1
发帖数: 178
45
来自主题: JobHunting版 - Should I accept the offer?
Today, I received an offer from a company at NYC, around 90k, current salary
around 70k. I have some issues here and not sure I should accept the offer
or not.
1)My current position is very stable and not too many pressure and I still
can learn a lot. The position at NYC seems not stable and lots of pressure.
2)My husband is working at NYC and he drives almost 3 hours every week to my
place. If I move to NYC, he does not drive, but both of us need to commute
at least 2.5 hours one day. Big chall... 阅读全帖
g***j
发帖数: 1275
46
来自主题: JobHunting版 - 问一个排序的问题
为啥quicksort的空间是lgN, 为啥mergesort的最坏的情况是N? 一般情况是什么?
quicksort, mergesort, heapsort,如何选择用哪个sort? 我只知道mergesort
stable,那么quicksort和heapsort的差别呢?除了worse case quicksort是n^2
另外,是不是只要涉及到交换的,都不stable?
w********p
发帖数: 948
47
来自主题: JobHunting版 - 问一个题目,面试时我没有搞出来
根据要求 In-place, 那么只能是数字之间swap
时间复杂度: O(N).
这两点加起来只能是quick 里面的一步patition,就是array 分成两块一边放奇数,一
边放偶数
但是不stable.
观察下input array是有特点的。根据数据特点把它变成stable的。
1。可以数出来有几个奇数,偶数,这样array分成subArray的size出来了。m=size of
奇数
2。同时找到最大值
3。将所有的奇数加上最大值*2
4。 two points point to end of each subArrays
5. swap (这里有点小小trick, 不然也会错)
6。 把奇数恢复到原来的值 - 2*Max
只是出来思路,code还没出来,纸上画了下,是work的。
s********x
发帖数: 914
48
来自主题: JobHunting版 - 有些面试题是够扯蛋的
可能java自带的quicksort不够强?
怎么说也该考虑median of three, 已经three way partition来handle duplicate吧
如果你指的是Array.Sort,可能都不是implemented in quicksort。 因为quicksort不
是stable的。
http://docs.oracle.com/javase/6/docs/api/java/util/Arrays.html
(For example, the algorithm used by sort(Object[]) does not have to be a
mergesort, but it does have to be stable.)
f*****e
发帖数: 2992
49
来自主题: JobHunting版 - FLAGBR 面经+offer
bloomberg那个好像不是开放题,是stable matching,一般要经过几轮才能stable。

^_^
e********3
发帖数: 18578
50
这个我感觉挺简单的呀:
1.Peek多次,直到找到两个不同的元素,因为是排序好的,这样你知道整个collection
里面所有元素的上限和下限。
2.然后开始peek,只要不是最大的元素,一律pop出来按照顺序放到array里面,用一个
array index保持当前在array中的位置。
3.重复元素一样按照在原来Quack中的顺序放到array里面,这样你的算法就是stable的
排序。
上面是原始的解法。这个时间的复杂度是O(n*m),m是平均需要多少次找到最小的元素,
空间复杂度是O(n).
更加高效的是新建一个stack和一个queue,如果是最小的元素,push到queue里面,如
果是最大的元素,push到stack里面,所有Quack里面的元素取出来以后,合并queue和
stack,queue是已经从小到大排好序的,直接放进array,stack最上面的是最小的,所
以也是pop出来直接放到array。
queue里面最大的元素小于stack里面最小的元素,所以需要先把queue里面的元素放到
array里面,然后再把stack里面的元素放到array里面,这个程序的... 阅读全帖
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)