由买买提看人间百态

topics

全部话题 - 话题: depth
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
d****f
发帖数: 313
1
楼上的办法怎么感觉有点不通用阿,我目前自己有个办法,就是先按照PID,DEPTH分组
,求出MIN(Reading)
SELECT PID, DEPTH, MIN(READING) AS MINR
FROM TABLE
WHERE READING>2
GROUP BY PID, DEPTH
然后再基于上面的结论把原表JOIN过来
SELEC A.PID, A.DEPTH, A.MINR, TABLE.PERCENT
FROM
(
SELECT PID, DEPTH, MIN(READING) AS MINR
FROM TABLE
WHERE READING>2
GROUP BY PID, DEPTH
) AS A LEFT JOIN TABLE
ON A.PID=TABLE.PID AND A.DEPTH=TABLE.DEPTH AND A.MINR=TABLE.READING
这样做是不是感觉更通用一些?
c***2
发帖数: 838
2
There is a solution at
http://www.ihas1337code.com/search/label/binary%20tree
/** See my comments **/
int maxDepthIterative(BinaryTree *root) {
if (!root) return 0;
stack s;
s.push(root);
int depth = 1, maxDepth = 0;
BinaryTree *prev = NULL;
while (!s.empty()) {
BinaryTree *curr = s.top();
if (!prev || prev->left == curr || prev->right == curr) {
if (curr->left) {
depth++;
s.push(curr->left);
} else if (curr->right) {
depth++;
... 阅读全帖
e****e
发帖数: 418
3
来自主题: JobHunting版 - g 两轮店面面经 失败告终
DFS approach. My code is lousy, the point is to show the DFS approach.
Thanks.
public int[] dFS(TreeNode root ) {
int depth = depth( root );
int[] r = new int[depth];
boolean[] m = new boolean[depth];

if ( root == null )
return r;

dFSCore( root, new MutableInt(0), r, m );

return r;
}

private void dFSCore( TreeNode node, MutableInt level, int[] r, boolean[
] m ) {
if ( node == null )
... 阅读全帖
w********p
发帖数: 948
4
来自主题: JobHunting版 - 亚麻三面面经,攒人品,求好运
3. 继续判断这个二叉树是不是平衡树
A balanced binary tree is commonly defined as a binary tree in which the
depth of the two subtrees of every node differ by 1 or less,[3] although in
general it is a binary tree where no leaf is much farther away from the root
than any other leaf. (Different balancing schemes allow different
definitions of "much farther".[4]) Binary trees that are balanced according
to this definition have a predictable depth (how many nodes are traversed
from the root to a leaf, root counting ... 阅读全帖
m*****n
发帖数: 2152
5
3x,受到启发,已经通过了,为了省时间,把你的循环里的不必要的if去掉了。
class Solution {
public:
int minimumTotal(vector > &triangle) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
int depth = triangle.size();
if(!depth) return 0;
else if(depth==1) return triangle[0][0];
vector curr_min(depth, 0), pre_min(depth,0);
pre_min[0] = triangle[0][0];
for(int i=1; i {
curr_min[0] = pre_min... 阅读全帖
d******8
发帖数: 148
6
来自主题: JobHunting版 - 问linkedin家一道题的followup
原题很简单,是sum nested list
Given a nested list of integers, returns the sum of all integers in the list
weighted by their depth. For example, given the list {{1,1},2,{1,1}} the
function should return 10 (four 1's at depth 2, one *2 at depth 1). Given
the list {1,{4,{6}}} the function should return 27 (one 1 at depth 1, one 4
at depth 2, and *one 6 at depth 3)
followup说改成return the sum of all integers in the list weighted by their
“reversed depth”. 也就是说{{1,1},2,{1,1}}的结果是(1+1+1+1)*1+2*2
面试官说要one pass... 阅读全帖
d******8
发帖数: 148
7
来自主题: JobHunting版 - 问linkedin家一道题的followup
原题很简单,是sum nested list
Given a nested list of integers, returns the sum of all integers in the list
weighted by their depth. For example, given the list {{1,1},2,{1,1}} the
function should return 10 (four 1's at depth 2, one *2 at depth 1). Given
the list {1,{4,{6}}} the function should return 27 (one 1 at depth 1, one 4
at depth 2, and *one 6 at depth 3)
followup说改成return the sum of all integers in the list weighted by their
“reversed depth”. 也就是说{{1,1},2,{1,1}}的结果是(1+1+1+1)*1+2*2
面试官说要one pass... 阅读全帖
w****a
发帖数: 710
8
用树结构做了一下nested sum
struct Node {
Node(int val = 0) : value(val){}

~Node() {
for(auto c : children) delete c;
children.clear();
}
void reverse_depth(int total_depth) {
if(depth > 0) depth = total_depth - depth + 1;
for(auto c : children) {
c->reverse_depth(total_depth);
}
}

int height() {
if(children.empty()) return 0;
int ret = 0;
for(auto c : children) ret = max(ret, c->height());
... 阅读全帖
d******1
发帖数: 140
9
来自主题: SanDiego版 - moving sale - everything must go
Everything needs to be sold before 8/20, will give to best offer
Pictures are here: http://sandiego.craigslist.org/csd/gms/5163791547.html
1. Simmons firm Mattress and box $300
For sale is a Simmons Beautyrest 700 queen mattress and box spring for free
that was purchased brand new from Sleep Train in July, 2013 for $700.
Mattress is in excellent condition and available due to moving. Asking price
is $300.00 or best offer. I have proof of purchase if needed to verify
purchase date and original a... 阅读全帖
P*****J
发帖数: 1745
10
来自主题: Animals版 - 那一次,看到了很多很多鸟
照得真好啊,真是像箭一样射入水中。我以前以为入水速度顶多有个30-40mph,我刚查
了查,原来入水速度可以>100km/h(62mph)。想想车子在高速上开迎面的风有多大,以
那个速度扎入水中,乖乖。名副其实的水鸟中的战斗机。
Food Capture And Consumption
Opportunistic generalist predator on pelagic prey; feeds diurnally; may hunt
singly, but generally forages communally in large “frantic-flocks” of up
to 1,000 over shoals of prey fish. Although a generalist predator, Northern
Gannet is a feeding specialist whose unique combination of body mass, size,
and shape allow it to utilize, almost solely, a feedin... 阅读全帖
N*******s
发帖数: 325
11
因为决定回国,所以转租这个公寓,并出售所有家具家电,详情请见:
http://seattle.craigslist.org/est/sub/4850154908.html
Hi there,
I am subleasing my 1BR townhouse apartment in Lionsgate, downtown Redmond.
Please check the location and floor plan :
Kipling: http://lionsgatenorthapartments.com/one-bedroom/
Also, I am selling all my furniture (please see the attached list for
details) and electronics including
- 50' Panasonic Plasma TV,
- Alienware PC i7 X51,
- Yamaha 5.1 Home Theater,
- Xbox One w/ Kinect and PS4
- ... 阅读全帖
r******r
发帖数: 700
12
来自主题: JobHunting版 - Finding deepest node of BST ?
root
node_k
node_n
我理解的是从 root -> node_k 的距离,是 node_k 的 depth;
从 node_k -> node_n 的距离,是 node_k 的 height
root's height = depth of node_n
root's depth = 0
node_n's height =0;
node_k's height = node_n - node_k
到 root 的最大相等路径的 leaf node 可能有多个,所以 deepest nodes 可能有多个。
from wiki:
# The depth of a node n is the length of the path from the root to the node.
The set of all nodes at a given depth is sometimes called a level of the
tree. The root node is at depth zero.
# The height of a tree is th... 阅读全帖
h*********n
发帖数: 11319
13
来自主题: JobHunting版 - 问个算法题,修改版
8,9 怎么错了啊?b的排序不是这么拍
的么?

import copy
def select(array, start, depth):
if depth==0:
print array
else:
for i in range(start, len(array)):
arrayCopy = copy.deepcopy(array)
del arrayCopy[i]
select(arrayCopy, i, depth-1)
def select2(array, string, start, depth):
if depth==0:
print string
else:
for i in range(start, len(array)):
string.append(array[i])
select2(array, string, i+1, depth-1)
del string[len(string)-1... 阅读全帖
l*******A
发帖数: 209
14
来自主题: JobHunting版 - 一道面试题和解法(求指点).
题目:
Write a method in Java to:
Find all set of permutations from N number of ArrayLists. Each ArrayList has
a different length.
Each permutation is formed by picking one item from each input ArrayList.
You have to exhaust ALL permutations and can't return duplicate permuations.
Each permutation is a Set, so the order of the items does not matter. For
example [a1,b1,c1] is the same permutation as [c1,b1,a1].
Example:
Input: N number of array lists with different length
[a1,a2,a3....]
[b1,b2....... 阅读全帖
S*******C
发帖数: 822
15
来自主题: JobHunting版 - Career cup 4.9 path sum的答案肯定错了
4.9 You are given a binary tree in which each node contains a value. Design
an algorithm to print all paths which sum to a given value. The path does
not need to start or end at the root or a leaf
Page 237
他的答案如下
package Question4_9;
import CtCILibrary.TreeNode;
public class Question {

public static void findSum(TreeNode node, int sum, int[] path, int level
) {
if (node == null) {
return;
}

/* Insert current node into path */
path[level... 阅读全帖
p*****2
发帖数: 21240
16
来自主题: JobHunting版 - 发个L家二面,求有onsite
object test extends App{
def depth(l: Any):Int = l match {
case n: Int => 1
case l: List[Any] => 1 + l.map(depth).max
}
def cal(l:Any, depth: Int):Int = l match {
case n: Int => n*depth
case l: List[Any] => l.map(cal(_, depth-1)).sum
}
val l = List(List(1,1), 2, List(1,1))
val res = cal(l, depth(l))
println(res)
}
f**********t
发帖数: 1001
17
来自主题: JobHunting版 - linkedin电面
// Given a nested list of integers, returns the sum of all integers in the
list
// weighted by their depth. For example, given the list {{1,1},2,{1,1}} the
// function should return 10 (four 1's at depth 2, one *2 at depth 1). Given
// the list {1,{4,{6}}} the function should return 27 (one 1 at depth 1, one
4
// at depth 2, and *one 6 at depth 3)
int getNum(string::iterator &i, string::iterator end) {
if (i == end) {
return 0;
}
bool neg = false;
if (*i == '-') {
neg = true;
... 阅读全帖
w********0
发帖数: 377
18
这时当时的code,我copy下来了。请大牛指点。
Given a nested list of positive integers: {{1,1},2,{1,1}}
Compute the reverse depth sum of a nested list meaning the reverse depth of
each node (ie, 1 for leafs, 2 for parents of leafs, 3 for parents of parents
of leafs, etc.) times the value of that node. so the RDS of {{1,1},2,{1,1}
} would be 8 = 1*1 + 1*1 + 2*2 + 1*1 + 1*1.
{1,{4,{6}}}
6*1 + 4*2 + 1*3 = 6+8+3 = 17
struct Iterm
{
int v;
bool isInteger();
int getInteger();
list getList();
l... 阅读全帖
z***b
发帖数: 127
19
Given a nested list of integers, returns the sum of all integers in the list
weighted by their depth
For example, given the list {{1,1},2,{1,1}} the function should return 10 (
four 1's at depth 2, one *2 at depth 1)
Given the list {1,{4,{6}}} the function should return 27 (one 1 at depth 1,
one 4 at depth 2, and *one 6 at depth 3)
public int depthSum (List input)
{
//Implement this function
}
/**
* This is the interface that allows for creating nested lists. You should
not i... 阅读全帖
z***b
发帖数: 127
20
Given a nested list of integers, returns the sum of all integers in the list
weighted by their depth
For example, given the list {{1,1},2,{1,1}} the function should return 10 (
four 1's at depth 2, one *2 at depth 1)
Given the list {1,{4,{6}}} the function should return 27 (one 1 at depth 1,
one 4 at depth 2, and *one 6 at depth 3)
public int depthSum (List input)
{
//Implement this function
}
/**
* This is the interface that allows for creating nested lists. You should
not i... 阅读全帖
w****a
发帖数: 710
21
来自主题: JobHunting版 - FLAG Yelp Uber Palantir等公司面经
我LD最近面了一堆公司,下面发她的面经攒人品。基本都是电面和onsite混着发的。
Google:
1. Wildcard match
2. http://www.fgdsb.com/2015/01/25/peek-iterator/类似。写一个de duplicator,wrap 几个stream,输出的stream全是不重复数字。
3. 求一个stream,出现次数最多的数字。然后扩展到N个machine的情况。
4. 假设某个company在不同国家都有office,每个国家的office,如果是当地的假期,
就可以放假了。假设可以查询任意航班的信息,每个星期只能呆在一个地方,只有周末
的时候才能飞去别的国家。找一个放假天数最多的schedule。
5. LRU + 一些 C++问题。
6. 这题记不大清楚了。好像是Longest increasing consecutive sequence, 然后一
个Tree的该进版。求longest increasing consecutive path。
7. file system design。就是设计一个大数据的存取问题。存在di... 阅读全帖
a*******n
发帖数: 64
22
题很简单,就是从n个数(1到n)里挑出k个数,return所有组合可能。我觉得下面有个
地方可以优化成n-depth+1,就不需要再往后面走了,因为这个解不成立,但是OJ上说
是错的,想了下竟然没想明白。有谁指点一下?
class Solution {
public:
void addComb(int n, int depth, int begin, vector>& res,
vector& solution){
if (depth==0){
res.push_back(solution);
}
for (int i = begin; i <= (n-depth+1); ++i){// i <= n is correct, why
n-depth+1 doesn't work?
solution.push_back(i);
addComb(n, depth-1, i+1, res, solution);
... 阅读全帖
l**e
发帖数: 97
23
来自主题: JobMarket版 - 贴几个 JD 吧 - 节日快乐
3 x Principal Engineer
1 x Principal Architect
工作地点在上海
=======================================
Principal Software Engineer – Presentation Technologies (首席系统软件开发/
架构工程师)
The Principal Software Engineer will be responsible for leading development
of sophisticated presentation technologies. Deep knowledge on browser
execution environment and in-depth understanding of site-speed improvement
best practices are expected. The successful candidate will be a top
performer and versatile professional lea... 阅读全帖
L******d
发帖数: 2461
24
这冰箱的depth是:
Depth with Handles 34 1/4"
Depth without Handles 31 3/4"
Depth without Door 27 7/8"
Depth (Total with Door Open) 46 1/2"
我们厨房cutout的depth是34".
l**e
发帖数: 97
25
来自主题: Returnee版 - 贴几个 JD 吧 - 节日快乐
3 x Principal Engineer
1 x Principal Architect
工作地点在上海
=======================================
Principal Software Engineer – Presentation Technologies (首席系统软件开发/
架构工程师)
The Principal Software Engineer will be responsible for leading development
of sophisticated presentation technologies. Deep knowledge on browser
execution environment and in-depth understanding of site-speed improvement
best practices are expected. The successful candidate will be a top
performer and versatile professional lea... 阅读全帖
d********0
发帖数: 25
26
来自主题: Tennessee版 - moving sale -- nashville
4 draw chest $70/$100
Product dimensions
Width: 31 1/2 "
Depth: 18 7/8 "
Height: 39 3/8 "
Width: 80 cm
Depth: 48 cm
Height: 100 cm
Product description
Drawer side/ Drawer back: Particleboard, Foil
Drawer bottom: Fiberboard, Acrylic paint
Partition/ Support rail, back: Particleboard
Back: Fiberboard
Drawer front/ Side panel/ Rail: Particleboard, Birch veneer, Clear acrylic
lacquer
Top panel: Particleboard, Birch veneer, Clear acrylic lacquer, Birch veneer
Table and 4 chairs $120/$179
Good to k... 阅读全帖
d********0
发帖数: 25
27
please contact mike @310-776-5186 or f*************[email protected]
4 draw chest $60
Product dimensions
Width: 31 1/2 "
Depth: 18 7/8 "
Height: 39 3/8 "
Width: 80 cm
Depth: 48 cm
Height: 100 cm
Product description
Drawer side/ Drawer back: Particleboard, Foil
Drawer bottom: Fiberboard, Acrylic paint
Partition/ Support rail, back: Particleboard
Back: Fiberboard
Drawer front/ Side panel/ Rail: Particleboard, Birch veneer, Clear acrylic
lacquer
Top panel: Particleboard, Birch veneer, Clear acrylic lacq... 阅读全帖
d********0
发帖数: 25
28
thanks for your suggestion. how to post pictures? thx
please contact mike @310-776-5186 or f*************[email protected]
4 draw chest $70
Product dimensions
Width: 31 1/2 "
Depth: 18 7/8 "
Height: 39 3/8 "
Width: 80 cm
Depth: 48 cm
Height: 100 cm
Product description
Drawer side/ Drawer back: Particleboard, Foil
Drawer bottom: Fiberboard, Acrylic paint
Partition/ Support rail, back: Particleboard
Back: Fiberboard
Drawer front/ Side panel/ Rail: Particleboard, Birch veneer, Clear acrylic
lacquer
Top ... 阅读全帖
f**s
发帖数: 968
29
链接在此:
http://www.kenrockwell.com/tech/8mm-f35.htm
8mm f/3.5 Fisheye
Pro-Optic, Samyang, Rokinon, Bower &c. (2009-)
© 2010 KenRockwell.com. All rights reserved.
Intro Specs Performance Compared Recommendations
8mm f/3.5 Fisheye, Pro-Optic Nikon AI-s version. enlarge. ($290, Korean, no
filters, 13.8 oz./391g). This one came from this link to it at Adorama (also
specifically in Nikon, Canon EOS, Pentax/Samsung and Minolta Maxxum/Sony
mounts). It also comes branded as Bower, also specif... 阅读全帖
s****u
发帖数: 118
30
来自主题: Programming版 - 来,做题吧。
单纯枚举permutation可以
void permutation(int depth, int len, string str) {
if (depth >= len) {
// aaa
return;
}
for (int i = depth; i < len; ++i) {
swap(str[i], str[depth]);
permutation(depth + 1, len, str);
swap(str[i], str[depth]);
}
}
j***h
发帖数: 4412
31
来自主题: CivilEngineering版 - 想考加州SE,求推荐人
发信人: jeffh (Jeffh), 信区: CivilEngineering
标 题: Re: Can Anyone Recommend Any Study Material for SE Exam?
发信站: BBS 未名空间站 (Fri Oct 14 13:05:47 2011, 美东)
The SE exam is a fixed passing rate exam depending on the state you take the
exam. The passing rate for April 2011 SE exam is 27%: http://www.ncees.org/Exams/SE_exam.php.
By the way, just a friendly reminder, before California eliminates its use
of
the state-specific SE exam, CA SE test is not just a simple test. The board
of CA is very serious ab... 阅读全帖
j***h
发帖数: 4412
32
来自主题: CivilEngineering版 - Can Anyone Recommend Any Study Material for SE Exam?
The SE exam is a fixed passing rate exam depending on the state you take the
exam. The passing rate for April 2011 SE exam is 27%: http://www.ncees.org/Exams/SE_exam.php.
By the way, just a friendly reminder, before California eliminates its use of
the state-specific SE exam, CA SE test is not just a simple test. The board
of CA is very serious about this test. The seismic-resisting design in CA
is totally different from those seismic-resisting designs in east coast and
China. In addition, th... 阅读全帖
j***h
发帖数: 4412
33
来自主题: CivilEngineering版 - Any recommended referance book for 16-hour SE exam?
发信人: jeffh (Jeffh), 信区: CivilEngineering
标 题: Re: Can Anyone Recommend Any Study Material for SE Exam?
发信站: BBS 未名空间站 (Fri Oct 14 13:05:47 2011, 美东)
The SE exam is a fixed passing rate exam depending on the state you take the
exam. The passing rate for April 2011 SE exam is 27%: http://www.ncees.org/Exams/SE_exam.php.
By the way, just a friendly reminder, before California eliminates its use
of the state-specific SE exam, CA SE test is not just a simple test. The
board of CA is very serious ab... 阅读全帖
j***h
发帖数: 4412
34
【 以下文字转载自 JobHunting 讨论区 】
发信人: Ginobili (潘帕斯雄鹰), 信区: JobHunting
标 题: [合集] 给作者: 报google nyc offer,并分享面经
发信站: BBS 未名空间站 (Sat Mar 19 21:31:54 2011, 美东)
☆─────────────────────────────────────☆
wolver (没有) 于 (Sat Mar 19 15:12:23 2011, 美东) 提到:
同学,
(这是关于你的置顶文章, 本来因该私人信件的,但是给后来者一个警告也好)
First, you should know that you have signed an NDA with Google at the
beginning of the on-site interview and things that were said and discussed
during the interview (particularly the interview questions) were cove... 阅读全帖
Y****a
发帖数: 17170
35
ford 车出厂的时候到底做不做beta testing呀?
最近一周又来了一堆的召回。
感情ford车主都是小白鼠。
beta testing的东西果然便宜呀。
laselang快来说说获奖感言呀
Ford recalls almost 600000 cars, SUVs, and trucks
ConsumerReports.org-12 hours ago
The largest of the recalls involves approximately 520,000 2013-15 Ford
Fusion and Lincoln MKZ sedans and Ford Edge SUVs built with ...
Ford Motor Company (NYSE:F) and Its Series of Problems
USMarketsDaily (blog)-8 hours ago
Explore in depth (3 more articles)
2011 Ford Fiesta Added to Door-Latch Recall
Edmunds.com-M... 阅读全帖
G******i
发帖数: 5226
36
☆─────────────────────────────────────☆
wolver (没有) 于 (Sat Mar 19 15:12:23 2011, 美东) 提到:
同学,
(这是关于你的置顶文章, 本来因该私人信件的,但是给后来者一个警告也好)
First, you should know that you have signed an NDA with Google at the
beginning of the on-site interview and things that were said and discussed
during the interview (particularly the interview questions) were covered
under the NDA.
第一,你应该知道你面试的时候签过NDA,所有面试过程中说的都是覆盖的,尤其是这
些面试题目。
Second, you are already doing damages to Google before you even started.
Once those ... 阅读全帖
b*******8
发帖数: 37364
37
来自主题: JobHunting版 - 攒人品,amazon面经
如只能一个Pass,那貌似只能用递归了,递归到最里面,记录下了长度,一层层退到一
半的时候,得到中间点,再一层层返回。
下面代码测试了长度0到4都对。如奇数个节点,正好取中间一个,偶数2N个,则取第N+
1个。调用时用:
int depth=0;
getMid(root,0,depth);
Node* getMid(Node* root, const int& thisLevel, int& depth)
{
if (!root) return NULL;
else {
Node* ret=getMid(root->next, thisLevel+1, ++depth);
if (ret) return ret;
else if (depth>>1 == thisLevel) return root;
else return NULL;
}
}
k******4
发帖数: 94
38
来自主题: JobHunting版 - 问个G家店面题完全二叉树
level order的最大问题就是空间复杂度,指数增长.
试着用DFS写了下,空间复杂度是O(logn),时间O(n),
//treeDepth 是树的实际高度,desiredDepth是叶子的期望高度。
//当第一次遇到一个比treeDepth高度小一的叶子,把desiredDepth的设置为treeDepth
-1,并且需要后面所有叶子的高度都是这个值。
bool validateCompleteBT(TreeNode*root, const int &treeDepth, int &
desiredDepth, int curDepth, bool &setDesiredDepthFlag)
{
curDepth++;
if(root->left == NULL && root->right == NULL)
{
if(setDesiredDepthFlag && curDepth == (treeDepth-1))
{
setDesiredDepthFlag... 阅读全帖
v***d
发帖数: 42
39
来自主题: JobHunting版 - 再发个L的面经吧
跟FB同一周面的……今天催L的recruiter,催来了个悲剧……
总共电面2轮,onsite5轮 - 其中2轮coding,2轮resume check和project,1轮design
……算上电面,总共面了11道……题目顺序已打乱:
1. given the list {{1,1},2,{1,1}},返回10……因为,(four 1's at depth 2, one
2 at depth 1). 给定 {1,{4,{6}}} ,返回27……因为, (one 1 at depth 1, one 4
at depth 2, and one 6 at depth 3)
2. leetcode: traversal binary tree level by level
3. 给2个string,判断是否可以map. say (foo, abb) 这2个string是可以map的, f->a
, o->b. say (foo, sdf),是不可以map的……返回bool值
4. 给一个string,每10个letter一组,输出所有出现次数超过一次的strings with
length... 阅读全帖
f***s
发帖数: 112
40
来自主题: JobHunting版 - airBnb电面面经
这题45分钟弄不出来
import java.util.HashMap;
import java.util.Map;
public class KDistance {
static class Node{
char c;
boolean isLeaf;
Node p;
Map children;
String word;
int no;
int depth;
static int counter = 0;
static Map nodemap = new HashMap();
public Node(Node parent, char c){
children = new HashMap();
p = parent;
if(... 阅读全帖
f***s
发帖数: 112
41
来自主题: JobHunting版 - airBnb电面面经
这题45分钟弄不出来
import java.util.HashMap;
import java.util.Map;
public class KDistance {
static class Node{
char c;
boolean isLeaf;
Node p;
Map children;
String word;
int no;
int depth;
static int counter = 0;
static Map nodemap = new HashMap();
public Node(Node parent, char c){
children = new HashMap();
p = parent;
if(... 阅读全帖
d********i
发帖数: 582
42
来自主题: JobHunting版 - 请教一道G的电面题。。
题目:给一个只包含0,1,*的 String,将所有的*替换成0或者1,返回所有的可能。
For example, “00*1*0” => {“001100”, “001110”, “000110”, “
000100”}
我的代码只输出: [“000100”, “000110”, “001110”], 但是少了“001100”.
我找不出原因。 谢谢。。
我的代码如下:
public static int depth;
public ArrayList combinationStarts(String s) {
int n = s.length();
char[] sc = s.toCharArray();
int starCount = 0;
for (int i = 0; i < n; i++) {
if (sc[i] == '*') {
starCount++;
}
}
depth = 0;
ArrayList res = n... 阅读全帖
x******y
发帖数: 6946
43
【 以下文字转载自 JobHunting 讨论区 】
发信人: Ginobili (潘帕斯雄鹰), 信区: JobHunting
标 题: [合集] 给作者: 报google nyc offer,并分享面经
发信站: BBS 未名空间站 (Sat Mar 19 21:31:54 2011, 美东)
☆─────────────────────────────────────☆
wolver (没有) 于 (Sat Mar 19 15:12:23 2011, 美东) 提到:
同学,
(这是关于你的置顶文章, 本来因该私人信件的,但是给后来者一个警告也好)
First, you should know that you have signed an NDA with Google at the
beginning of the on-site interview and things that were said and discussed
during the interview (particularly the interview questions) were cove... 阅读全帖
l**t
发帖数: 6971
44
【 以下文字转载自 JobHunting 讨论区 】
发信人: Ginobili (潘帕斯雄鹰), 信区: JobHunting
标 题: [合集] 给作者: 报google nyc offer,并分享面经
发信站: BBS 未名空间站 (Sat Mar 19 21:31:54 2011, 美东)
☆─────────────────────────────────────☆
wolver (没有) 于 (Sat Mar 19 15:12:23 2011, 美东) 提到:
同学,
(这是关于你的置顶文章, 本来因该私人信件的,但是给后来者一个警告也好)
First, you should know that you have signed an NDA with Google at the
beginning of the on-site interview and things that were said and discussed
during the interview (particularly the interview questions) were cove... 阅读全帖
t*****s
发帖数: 2933
45
【 以下文字转载自 SanFrancisco 讨论区 】
发信人: lopt (好好学习天天向上), 信区: SanFrancisco
标 题: [合集] 给作者: 报google nyc offer,并分享面经 (转载)
发信站: BBS 未名空间站 (Sat Mar 19 23:38:42 2011, 美东)
发信人: Ginobili (潘帕斯雄鹰), 信区: JobHunting
标 题: [合集] 给作者: 报google nyc offer,并分享面经
发信站: BBS 未名空间站 (Sat Mar 19 21:31:54 2011, 美东)
☆─────────────────────────────────────☆
wolver (没有) 于 (Sat Mar 19 15:12:23 2011, 美东) 提到:
同学,
(这是关于你的置顶文章, 本来因该私人信件的,但是给后来者一个警告也好)
First, you should know that you have signed an NDA with Google at the
beginning of... 阅读全帖
G***G
发帖数: 16778
46
来自主题: Fishing版 - 我钓crappie的装置
someones use leader instead. so the problem with bobble getting too close
to the hook is solved.
what is biggest distance between your hook and your bobber you ever tried?
3 feet, 5 feet, or 7feet?
My concern is the following.
for example, we want to use bobble to control the lure's depth in water
to be 3 feet.
suppose the split weight is 1 feet away from the hook.
if you leave your line there alone and don't retrieve it, it keeps
fine with 3 feet depth.
but once you retrieve it, the bobble will... 阅读全帖
g*********r
发帖数: 1443
47
来自主题: Fishing版 - 水深与颜色
今天学了点新知识,和大家分享:
Reflection, Refraction, and Color
The uppermost, sunlit layer of the ocean where 70 percent of the entire
amount of photosynthesis in the world takes place is called the euphotic
zone. It generally extends to a depth of 100 meters (330 feet). Below this
is the disphotic zone, between 100 and 1,000 meters (330 and 3,300 feet)
deep, which is dimly lit. Some animals are able to survive here, but no
plants. Although the amount of light is measurable at this range of depths,
there is ... 阅读全帖
Z****e
发帖数: 6171
48
depth 看着这个depth我就想笑
人家一流强队是先搞一套牛逼首发再depth 你利物浦首发都是二流 还depth 再多depth
也是二流
m****z
发帖数: 978
49
来自主题: Swimming版 - 鼓足勇气
这是个非常敏感的话题。要是在网版,俺碰都不敢碰。
首先,这个排名不是等距离的,比金字塔还金子塔,下面很宽,上面非常非常窄。
个人认为,从一开始到3.0不难。
认真到3.5可以。 大概95%左右都在3.5或以下。
到4.0非常难,一般就是露天场地大牛,不是天天能见到。基本要有系统的训练。
4.5 以上很难在公共场子见到,一般都在俱乐部里,孤独求败,很难找到对手。差不多
Swim Master平均靠上水平。
5.0 基本就可以Division 1 player
5.5 就是差不多几个州前几名。
6.0 以上,一般都要有全美国排名,基本是职业的。
4.0和学会蝶泳都是我的Bucket list上的。很难做横像比喻,以我为例子,4.0比蝶泳
难,更像1米1秒巡航。我打网球15年,比游泳花的时间多多了,现在觉得4.0还很渺茫
,甚至觉得到不了。
可能,游泳有半点童子功在游泳上沾了不少便宜。还有就是体重,游泳不吃亏。可网球
这急停,N个方向变速跑,大体重很吃亏。
General Characteristics of Various NTRP Playing Levels
(Wheelchair p... 阅读全帖
c**i
发帖数: 6973
50
来自主题: Literature版 - Pen Name
Steven Hayward, Literary Camouflage; Eric Blair contemplated calling himself
H. Lewis Allways, P.S. Burton, Kenneth Miles—or George Orwell. Wall Street
Journal, June 23, 2011 (date in print) http://online.wsj.com/article/SB1000142405270230365
7404576359331656789852.html?mod=WSJ_Books_LS_Books_6
(book review on Carmela Ciuraru, Nom de Plume; A (secret) history of
pseudonym. Harper, 2011)
Note:
(1) nom de plume
http://en.wiktionary.org/wiki/nom_de_plume
("Coined in English from French nom (“name”... 阅读全帖
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)