n*******e 发帖数: 37 | 1 来自主题: JobHunting版 - fb 电面 compare() 是不是也能这样做?
bool compare(string &A, string &B) {
for (int i = 0; i < A.size() && i < B.size(); i++) {
// if equal, continue to the next char;
// if not equal, return true if A[i] is smaller
if (A[i] != B[i])
return (mymap[A[i]] < mymap[B[i]]);
}
// if reach the end of A, A is then smaller
return (i == A.size()) ? true : false;
} |
|
m*****k 发帖数: 731 | 2 你是说 ’回‘ ok, where the big rectangle embeds 1 smaller rectangle
‘日’ 不OK?where the big rectangle embeds 2 smaller rectangles? |
|
c***z 发帖数: 6348 | 3 capacity vs expertise
capacity is broad and more desirable in larger companies since they have a
portfolio of projects/products; hence larger companies prefer coding to test
basic capacities
expertise is narrow and more desirable in smaller companies since they have
narrow focus; hence smaller companies prefer projects to show case expertise
you can still do either good or bad, depends on the interviewers: level A
interviewers hire level A people, level B interviewers hire level C and
lower peop... 阅读全帖 |
|
d****n 发帖数: 397 | 4 DP
python solution
class Solution:
"""
@param A: A positive integer which has N digits, A is a string.
@param k: Remove k digits.
@return: A string
"""
def DeleteDigits(self, A, k):
# write you code here
l = len(A)
S = [['' for j in range(k + 1)] for i in range(l + 1)]
T = ''
for j in range(0, k + 1):
S[j][j] = ''
for i in range(1, l + 1):
T += A[i - 1]
S[i][0] = T
for j in range(1... 阅读全帖 |
|
d****n 发帖数: 397 | 5 DP
python solution
class Solution:
"""
@param A: A positive integer which has N digits, A is a string.
@param k: Remove k digits.
@return: A string
"""
def DeleteDigits(self, A, k):
# write you code here
l = len(A)
S = [['' for j in range(k + 1)] for i in range(l + 1)]
T = ''
for j in range(0, k + 1):
S[j][j] = ''
for i in range(1, l + 1):
T += A[i - 1]
S[i][0] = T
for j in range(1... 阅读全帖 |
|
h*c 发帖数: 23 | 6 During the processing, it will get smaller (see Wiki), so detecting looping
or 1 works:
To see this fact, first note that if n has m digits, then the sum of the
squares of its digits is at most 9^2 m, or 81m.
For m=4 and above, n > 10^{m-1} > 81m
so any number over 1000 gets smaller under this process and in particular
becomes a number with strictly fewer digits. Once we are under 1000, the
number for which the sum of squares of digits is largest is 999, and the
result is 3 times 81, that is, 24... 阅读全帖 |
|
l********6 发帖数: 129 | 7 为什么是O(n)?你的while loop并不能保证每次查找upperbound的时间达到O(1)啊,你
的smaller存的是每一个A[i]的upperbound,但是每次查找的过程都是顺着smaller里面
存的下标往前找,直到找到第一个A[index]可以满足A[i] > A[indx],这是线性不是常
量的复杂度啊,方便的话求详解~~ |
|
w**z 发帖数: 8232 | 8 【 以下文字转载自 Programming 讨论区 】
发信人: wwzz (一辈子当码工), 信区: Programming
标 题: Amazon, Microsoft Tighten Grip On Cloud Market
发信站: BBS 未名空间站 (Mon Nov 16 13:08:20 2015, 美东)
马鬃: 36.9%
软软: 8.7%
For the third consecutive quarter, the three biggest cloud computing vendors
gained market share, while smaller vendors lost share, investment bank
Goldman Sachs said in a report Thursday.
Amazon.com's (NASDAQ:AMZN) Amazon Web Services continued to hold a massive
lead in the third quarter with 36.9% share, up from 33... 阅读全帖 |
|
w**v 发帖数: 14 | 9 感想:
0。题不难,都做出并跑出了。
1。全是从印度本土来的老印,除了recruiter
2。有点不专业,最后的面试是通过skype/hangout进行。面试官造成其中两轮时间缩
短。
3。面试时间11:00-6:00之间,不为申请人着想
4。没有onsite,是省钱吗?但据说工资开得高
网上测试题忘了,但记得是challenge III,在hackerrank上。3小时,实际不用那么多。
电面
Given a list of pairs in form of (employee, manager), find out all reports
of any given employee and print them out.
Example:
(A,B)
(C,B)
(D,A)
(B,E)
Given B, you should print out
B
-A
--D
-C
正式面试coding三轮
Given a string and an expression, find out how many times the expression
appears in the string ... 阅读全帖 |
|
o*q 发帖数: 630 | 10 Google
Show problem tags Hide locked problems
#
Title
Acceptance
Difficulty
Frequency
66 Plus One 35.4% Easy
146 LRU Cache 15.8% Hard
200 Number of Islands 29.7% Medium
288 Unique Word Abbreviation 15.7% Easy
163 Missing Ranges 30.3% Medium
56 Merge Intervals 26.7% Hard
228 Summary Ranges 26.0% Medium
308 Range Sum Query 2D - Mutable 20.8% Hard
279 Perfect Squares 34.1% Medium
388 L... 阅读全帖 |
|
o*q 发帖数: 630 | 11 # Title Editorial Acceptance Difficulty Frequency
1
Two Sum 28.3% Easy
292
Nim Game 54.4% Easy
344
Reverse String 57.3% Easy
136
Single Number 52.2% Easy
2
Add Two Numbers 25.6% Medium
371
Sum of Two Integers 51.6% Easy
4
Median of Two Sorted Arrays
20.4% Hard
6
ZigZag Conversion 25.6% Easy
13
Roman to Integer 42.7% Easy
237
... 阅读全帖 |
|
c********h 发帖数: 7827 | 12 yes, it's very normal for retired to switch to smaller house. they no longer
have kids at home, and smaller house is cheaper and easier to maintain. |
|
G****y 发帖数: 3537 | 13 The seller's final offer is $5000 more than our bottom line (price after I
did reserch based on other sold houses, size actually is one factor). We
accepted it because of the tax credit. Now the house actually has smaller
footage.
We are looking for a little bigger house for long term. End up with current
small one by thinking it might be ok. The truth is current house buying has
even smaller size than the listing. This makes me feel bad, almost
frustrated. |
|
r****6 发帖数: 57 | 14 About drain:
See manual page 7 "caution" section. It's suggested to do not install a
drain line near it. "Installation of the the drain line must be either above
the disposal, or if a second sink drain is available, install it above the
cross bar on the second sink". We chose the latter approach as our second
sink tubing is smaller than yours.
Based on what's on your sink, the double sink connection you have is a bit
different from ours. Don't think the smaller circled tube is the right spot,
ye |
|
y*****a 发帖数: 580 | 15 1. You are right that in (i), 2 is the best. I read a wrong # for (4),
thinking it was 569... than 596.
2. I did calculate the principle after a number of years. It turns out that
before 4.3 yrs (for example 1 yr), remaining principle for case (2) is
smaller than case (1). If it is more than 4.3 yrs, for example 5 yrs, the
remaining principle for case (2) is more than case (1). I did not calculate
when case (2) remaining principle again smaller than (1) and I think it
should leave to LZ's ta... 阅读全帖 |
|
j*********r 发帖数: 406 | 16 NEW YORK (CNNMoney) -- In the run-up to President Obama's State of the Union
address next Tuesday, Republicans are turning up the volume on their
pledges to cut spending.
On Thursday, the House Republican Study Committee -- which includes some of
the party's most conservative members -- introduced a bill that the
committee said would reduce spending by $2.5 trillion over a decade.
The bill takes the money primarily from non-defense discretionary spending,
which constitutes 19% of the budget. It ... 阅读全帖 |
|
h***b 发帖数: 1233 | 17 there's good and bad about smaller lenders--
efficient is good, risk of not getting loan closed/funded on time is real.
smaller lenders don't keep loans. they have to sell to Fannie/Freddie or
other bigger lenders (BofA, Wells, Citi). they follow guidelines strictly ' |
|
m*****n 发帖数: 341 | 18 这里报价 265k 面积1195,但是卖方将一间地下室也算进去了 如果除去地下室 面积
约970 我给卖方代理说22万 说:不可能
那房子不大,但是收拾的井井有条。
大家看看 多少钱合适?
64 Crescent AveMalden, MA 02148
Previous1 of 16 NextLarger.For Sale: $265,000Zestimate®:
$256,000Mortgage payment:
Estimated Monthly PaymentPrice: Down payment:% ($26,500) 30 Year
Fixed: 4.49% $1,515 /mo 15 Year Fixed 3.69% $2,036 /mo 5/1 ARM: 2.91% $1,
303 /mo . Include estimated taxes and insurance
See current rates On
$1,515/mo ..See current rates on Z... 阅读全帖 |
|
h***b 发帖数: 1233 | 19 correct, break even on cash flow gives no return on your down pay. and yes,
the smaller the down pay, the smaller the "loss" on invested capital
on the other hand, non-cash write offs such as depreciation, your return is
the saving on income tax. perhaps use that as quasi ROIC? :p |
|
t**********j 发帖数: 382 | 20 If you get the loan directly from Wells Fargo, you can refinance it at any
time. There will be no loss for the loan officer. If you get the loan from
the other smaller lenders (bankers or brokers or smaller bank), you should
keep it for 4-6 months before closing the refinance loan. |
|
n*******9 发帖数: 3244 | 21 for your case, don't wait for the bank's(your lender's) appraiser because by
then you are too later if the measure is smaller than what the listing says
. hire an appraiser and do a measure (only the measure not the value) at the
same time with your inspection (or before). this way, you will have a
chance to walk away without getting hurt if the size is smaller and the
seller decides to do nothing about. |
|
j***b 发帖数: 5901 | 22 Feng Shui is about Qi. The smaller the road, the more severe the Sha Qi. It
has nothing to do with traffic. Even foot trails can cause Chong (actually
much stronger chong than main road, because it's smaller/narrower). |
|
m***y 发帖数: 14763 | 23 I know you'll be tempted by a chain saw, who isn't? It's powerful, and make
you feeling like a MAN. I do have an electric one, for I hate maintaining
small engines. But for smaller trees, a curved pruning saw works fine.
Bottom line, never use a chain saw on a ladder; always keep it below waist
height.
Whenever in doubt, always use three cuts. That is, two face cuts to make a
notch, facing the direction of falling. Then a cut into the opposite side
slowly, when the tree starts falling, stop your... 阅读全帖 |
|
l*****o 发帖数: 26631 | 24 我去年试的这个recipe, 前面准备时间有点长, 烤的时候比较简单
Crisp-Skin High-Roast Butterflied Turkey with Sausage Dressing
Serves 10 to 12
If you prefer not to brine your turkey, we recommend a kosher bird. The
dressing can be made with cornbread, challah, or Italian bread, but note
that they are not used in equal amounts. If you don’t own a
broiler pan top or if yours does not span the roasting pan, try a sturdy
wire rack that rests comfortably on top of a 12 by 16-inch disposable
roasting pan. Cover the rack with a la... 阅读全帖 |
|
W*******Y 发帖数: 283 | 25 maybe a smaller shower place + a deep soaking tub. The deep soaking tub is
smaller than the regular tub but actually works better and is getting more
popular now. |
|
i**z 发帖数: 1592 | 26 网上抄的科普:
Nails: The nails used by carpenters, illustrated in Fig. 161, are of four
different kinds, as follows: Common nails, A, which range in size from 3d (3
penny) to 60d box nails, other nails for common use being generally of this
type.
Finish nails, B, which range in size from Gd to lOd, and are used for
moldings, picture frames, and other places where it is required that the
nails should be as nearly invisible as possible. This shape of head may be
set beneath the surface with the least da... 阅读全帖 |
|
n*******w 发帖数: 6708 | 27 一直比较忙,没时间照照片
虽然漏水, 但是还能用,真的是懒得邮回去换
customer review 里关于leak 说了一大堆
但到现在我都不知道怎么弄出他们说的那个 loud snap
http://www.amazon.com/Hoover-SteamVac-Carpet-Cleaner-F5914-900/
If your new machine LEAKS, see note #2 below. I am just amazed at how many
people write that their machine leaked from day one, and they returned it.
It will leak if you skip a crucial one-time set-up step.
Paid $170 at Best Buy. This is my first carpet cleaner so I have nothing to
compare it to except my own expectations. Even though the ... 阅读全帖 |
|
G***G 发帖数: 16778 | 28 I tried my method once again after this spring.
It worked very well. Actually it is not tiring at all.
Buy fertilizer beads. The smaller, the better.
If you buy smaller fertilzier beads, you actually don't need to shake and
the beads will automatically fall into the ground from the milk bottle.
If you really don't want to shake, you can try put the milk bottle in a baby
cart. You just push the baby cart around your yard.
I don't try the baby cart method. I am afraid my neighbors will laugh at me... 阅读全帖 |
|
G***G 发帖数: 16778 | 29 I tried my method once again after this spring.
It worked very well. Actually it is not tiring at all.
Buy fertilizer beads. The smaller, the better.
If you buy smaller fertilzier beads, you actually don't need to shake and
the beads will automatically fall into the ground from the milk bottle.
If you really don't want to shake, you can try put the milk bottle in a baby
cart. You just push the baby cart around your yard.
I don't try the baby cart method. I am afraid my neighbors will laugh at me... 阅读全帖 |
|
R*N 发帖数: 2173 | 30 The law imposes penalties to ensure that all taxpayers pay their taxes. Some
of these penalties are discussed below. If you underpay your tax due to
fraud, you may be subject to a civil fraud penalty. In certain cases, you
may be subject to criminal prosecution.
Background Information on IRS Tax Penalty
This information is intended as technical information of use to consultants
and individuals doing research. For information on tax assistance, click
here.
Scroll Down for Quick Reference ... 阅读全帖 |
|
R****i 发帖数: 91 | 31 Just notice it and wanna share with you guys. Hopefully it is not a too old
news..
Q. What types of merchants are in the Grocery store category?
A. Merchants in the Grocery store category include supermarkets as well as
smaller grocery stores and most convenience stores. Please note that some
merchants that sell grocery items are not included in the Grocery store
category; for example, smaller merchants such as drugstores and merchants
that specialize in only a few grocery items, as well as larg... 阅读全帖 |
|
k*********q 发帖数: 161 | 32 Merchants in the Grocery store category include supermarkets as well as
smaller grocery stores and most convenience stores. Please note that some
merchants that sell grocery items are not included in the Grocery store
category; for example, smaller merchants such as drugstores and merchants
that specialize in only a few grocery items, as well as larger stores that
sell a wide variety of goods, such as warehouse clubs and discount stores.
However, you will earn 5% cash back on your grocery purcha... 阅读全帖 |
|
r******l 发帖数: 10760 | 33 发信给Chase也没问出个所以然来。下面是Chase的回复:
Merchants in the office supply stores category specialize
in selling a variety of office supplies, from larger
office supply stores to smaller stationary stores. Please
note that some larger merchants that sell a wide variety
of general goods which may include office supplies, for
example, discount stores, department stores, or
electronics stores, are not included in this category.
Also, merchants and wholesale distributors that specialize
in only a few large offic... 阅读全帖 |
|
m**2 发帖数: 3374 | 34 If you are going to be purchasing money orders for manufacturing spend then
you should be aware of this stuff. Be aware of what the banks are required
to report and DO NOT IN ANY WAY try to evade reporting. I am not a lawyer,
but here is what I wouldn’t do:
Deposit over $10,000 in a short period of time in smaller amount or
spread across different institutions.
Purposely deposit less than $10,000 just to avoid the reporting
requirements.
Anything else that even remotely feels like I ... 阅读全帖 |
|
C********i 发帖数: 73 | 35 The Advocate CS is one of 4 high-capacity convertible car seats that Britax
currently sells. The others are the Britax Marathon, Britax Decathlon, and
Britax Boulevard.
The Marathon and Boulevard are also sold with CS (Click & Safe). From what I
can tell, the Marathon and the Decathlon have smaller bases for
installation in smaller vehicles. The Decathlon has an infant body pillow
and multiple buckle positions, but otherwise, it is similar to the Marathon,
including height and weight ratings. Th... 阅读全帖 |
|
L****T 发帖数: 64 | 36 在小的时候 被欺负过几次(也就是被咬过,打一下)。从没欺负过人。现在同龄小孩不
敢欺负他了。
Children in his age, the smaller size, the more aggressive they can be.(
probably try to compensate their sizes). I saw several cases that smaller
size kids tried to bully larger size kids.
His mother is relatively tall among Chinese. I am a little bit above average
. |
|
k***n 发帖数: 3158 | 37 you'd better return this junk
this type of humidifier does NOT work. Buy a hygrometer and you will know
from the reading. Again, it does not work, meaning it does not improve
the RH in your room. Dont be cheated by the nice mist you saw from it.
Even worse, it is generating water droplets instead of water vapor.
What's the difference? Water vapor should be in molecular phase so it
increases RH directly. Water droplets evaporate firstly and become vapor.
Our tap water is not that clean so it has ... 阅读全帖 |
|
l**********e 发帖数: 387 | 38 谢谢版妈分享~
我刚买了个groupon, 四十刀,是JC Penney 的,
•Six single-image enhanced portrait sheets, 10”x13” or smaller
•One Be Squared portrait, 10”x10” or smaller
•One single-image CD
•40% off additional portrait purchases
•Waived sitting fees (有职员说最多7人)
我打算下个月去約,照了再分享 |
|
s********e 发帖数: 28 | 39 【 以下文字转载自 Texas 讨论区 】
发信人: springlake (SpringLake), 信区: Texas
标 题: Dallas 给宝宝照相的好丢
发信站: BBS 未名空间站 (Mon Sep 12 15:53:25 2011, 美东)
JcPenny Portraits
$40 for Enhanced Portrait Package ($209.89 Value)
$40元可以买到价值$209.89元的Package,包括:
•Six single-image enhanced portrait sheets, 10”x13” or smaller
•One Be Squared portrait, 10”x10” or smaller
•One single-image CD
•40% off additional portrait purchases
•Standard sitting fees for all subjects in the photoshoot are waived
6张照片... 阅读全帖 |
|
g*********r 发帖数: 113 | 40 Donot worry. It will become bigger and bigger and finally get smaller.
My baby is 3 month old now. And it just started getting smaller. It willnot
hurt the baby. |
|
c*****n 发帖数: 1539 | 41 $5 转:
一张 free dreft Detergent 32 loads or smaller (up to $10)
expires 9/30/2012
pampers gift to grow 1250点换来的,就是可以免费拿一桶宝宝用的洗涤液, 最多省
10块。
One Free Product coupon good for a bottle of 2X Ultra Dreft, 32 loads or
smaller. (up to $10 limit) For baby's first years, rely on Dreft, the #1
choice of pediatricians. Limit one coupon per purchase.
Coupon expires 09/30/2012.
$2 转:
free any one product from Organic Valley (up to $10) Expires 04/30/12
我从EBAY买的,用了几张买它家的organic whole milk. Whole food加Omega3的卖4.... 阅读全帖 |
|
|
f**********n 发帖数: 246 | 43 Please keep the baby. The antiacid you took is okay to take during pregnancy
. Skipping synthroid for a month is not such a big deal neither. You are 35
years old already. The chance of getting pregnant is becoming smaller and
smaller each year. Be very careful.
BTW. I am a physician and I usually try not to give online medical advice
online.
30 |
|
R*******d 发帖数: 13640 | 44 http://en.wikipedia.org/wiki/Dutch_famine_of_1944
Dutch famine of 1944 Legacy[edit]
This famine was close to unique as it took place in a modern, developed and
literate country, albeit suffering under the privations of occupation and
war (other example: the famine during the siege of Leningrad). The well-
documented experience has allowed scientists to measure the effects of
famine on human health.
The Dutch Famine Birth Cohort Study, carried out by the departments of
Clinical Epidemiology and B... 阅读全帖 |
|
r*****y 发帖数: 3406 | 45 My OB also said it's normal that my baby is smaller and had smaller head
when he was born as a Asian baby. |
|
m****c 发帖数: 629 | 46 我家的是男宝,15个月,正在找合适的鞋子,太难买到合适的鞋子。stride rite 鞋底
很软但我家宝宝脚面高,好不容易塞进6.5号的wide的还是很紧,有几款能穿但鞋底又
太硬了,没有试到合适的。See Kai Run在网上买了两双,一双是软皮面的,一双是帆
布面的sneaker,鞋子非常宽,虽然上面的皮子很软,但是鞋底都太硬了,听说是楼主
买的那种smaller鞋底才软,可是宝宝要穿的号超过smaller的最大号。目前只有一款
Nike的还算满意,鞋底非常软但是鞋子有些偏宽,宝宝穿着跑起来挺灵活的,买了两双
先凑合着用了。
双, |
|
m****c 发帖数: 629 | 47 我家的是男宝,15个月,正在找合适的鞋子,太难买到合适的鞋子。stride rite 鞋底
很软但我家宝宝脚面高,好不容易塞进6.5号的wide的还是很紧,有几款能穿但鞋底又
太硬了,没有试到合适的。See Kai Run在网上买了两双,一双是软皮面的,一双是帆
布面的sneaker,鞋子非常宽,虽然上面的皮子很软,但是鞋底都太硬了,听说是楼主
买的那种smaller鞋底才软,可是宝宝要穿的号超过smaller的最大号。目前只有一款
Nike的还算满意,鞋底非常软但是鞋子有些偏宽,宝宝穿着跑起来挺灵活的,买了两双
先凑合着用了。
双, |
|
m**********a 发帖数: 76 | 48 长期在宝宝版潜水,学到不少知识,也来写一写我买stroller的经历吧,价钱基本是用
amazon的来比较。第一次开帖,一家之言, 调查考虑不周之处, 请大家轻拍, 若是补充
改正一下就更好啦。
我在宝宝出生之前买了 chicco key fit 30 travel system,当时挺得意的,觉得配
套的就perfect。用了几个月,出门看到别的妈妈推Britax B ready,顿时觉得Britax
好太多了,娃娃面向自己,位置高,遮阳棚大,于是决心也给宝宝换一个。我的基本要求
是:宝宝可以面向自己,而且可以坐的比较高,容易调换座位方向尽量避免晒到宝宝。
Contours Options 3 Wheel Stroller:这一款是我找到的reversible stroller里面最
便宜的,只要169,且声称大多数carseat都可以和它配套。
Bumbleride Flyer Reversible handle stroller:reversible handle stroller 里最
便宜,250。但它有一个缺点就是座位不能反过来,如果想面对宝宝,只能用
reversib... 阅读全帖 |
|
x***l 发帖数: 380 | 49 No, don't it. A child need a lot money and time. Why so people can have
endless kids here, but they just have 1-2? Family size is getting smaller
and smaller, people can't afford big family now.In your situation, 2 kids
already a lot. |
|
s********e 发帖数: 28 | 50 【 以下文字转载自 Texas 讨论区 】
发信人: springlake (SpringLake), 信区: Texas
标 题: Dallas 给宝宝照相的好丢
发信站: BBS 未名空间站 (Mon Sep 12 15:53:25 2011, 美东)
JcPenny Portraits
$40 for Enhanced Portrait Package ($209.89 Value)
$40元可以买到价值$209.89元的Package,包括:
•Six single-image enhanced portrait sheets, 10”x13” or smaller
•One Be Squared portrait, 10”x10” or smaller
•One single-image CD
•40% off additional portrait purchases
•Standard sitting fees for all subjects in the photoshoot are waived
6张照片... 阅读全帖 |
|