Redian新闻
>
EB1a I-140 is approved after NOID response
avatar
S*0
2
今天刚收到email,NOID回复交上去一个来月,EB1a I-140 has been approved。感谢
Zac Liu律师事务所, 特别是Christina Le律师的专业帮助。 也感谢版上的Laoda,
doubleminute提供的回复模板。谢谢大家的帮助和支持。
由于是和律师签了保密协议,PL 和 NOID reponse letter不方便与大家分享,万谅。
总的感觉是凡是都有可能,尽力而为。
avatar
f*4
3
这是从 www.ihas1337code.com copy来的解法
一下子找不到那个url了,感谢ihas1337code整理得这些算法
void connect(Node* p) {
if (!p) return;
if (p->leftChild)
p->leftChild->nextRight = p->rightChild;
if (p->rightChild)
p->rightChild->nextRight = (p->nextRight) ?
p->nextRight->leftChild :
NULL;
connect(p->leftChild);
connect(p->rightChild);
}
avatar
n*g
4
good

【在 S*****0 的大作中提到】
: 今天刚收到email,NOID回复交上去一个来月,EB1a I-140 has been approved。感谢
: Zac Liu律师事务所, 特别是Christina Le律师的专业帮助。 也感谢版上的Laoda,
: doubleminute提供的回复模板。谢谢大家的帮助和支持。
: 由于是和律师签了保密协议,PL 和 NOID reponse letter不方便与大家分享,万谅。
: 总的感觉是凡是都有可能,尽力而为。

avatar
w*3
5
这个算法好像只考虑了同parent和同grand-parent的情况
如果树是:
1
2 3
4 5 6 7
8 15
8的next设为15的话,
这个算法是不是就不对了

【在 f****4 的大作中提到】
: 这是从 www.ihas1337code.com copy来的解法
: 一下子找不到那个url了,感谢ihas1337code整理得这些算法
: void connect(Node* p) {
: if (!p) return;
: if (p->leftChild)
: p->leftChild->nextRight = p->rightChild;
: if (p->rightChild)
: p->rightChild->nextRight = (p->nextRight) ?
: p->nextRight->leftChild :
: NULL;

avatar
b*r
6
cong
avatar
f*4
7
http://www.ihas1337code.com/2010/03/first-on-site-technical-int
那题有假设条件
You may assume that it is a full binary tree
任意的树用遍历的方法
维护一个足够大的数组
Node ** current_tail;
递归的时候把当前level作为参数传进去,根据level,赋值current_tail[level]->next = node;
current_tail[level] = node;

【在 w*****3 的大作中提到】
: 这个算法好像只考虑了同parent和同grand-parent的情况
: 如果树是:
: 1
: 2 3
: 4 5 6 7
: 8 15
: 8的next设为15的话,
: 这个算法是不是就不对了

avatar
b*r
8
btw: you are lucky:)
avatar
w*3
9
恩,
多谢多谢

next = node;

【在 f****4 的大作中提到】
: http://www.ihas1337code.com/2010/03/first-on-site-technical-int
: 那题有假设条件
: You may assume that it is a full binary tree
: 任意的树用遍历的方法
: 维护一个足够大的数组
: Node ** current_tail;
: 递归的时候把当前level作为参数传进去,根据level,赋值current_tail[level]->next = node;
: current_tail[level] = node;

avatar
p*i
10
big cong!

【在 S*****0 的大作中提到】
: 今天刚收到email,NOID回复交上去一个来月,EB1a I-140 has been approved。感谢
: Zac Liu律师事务所, 特别是Christina Le律师的专业帮助。 也感谢版上的Laoda,
: doubleminute提供的回复模板。谢谢大家的帮助和支持。
: 由于是和律师签了保密协议,PL 和 NOID reponse letter不方便与大家分享,万谅。
: 总的感觉是凡是都有可能,尽力而为。

avatar
i*e
11
I have listed two methods on my blog.
During that onsite interview, I gave the first solution, which is more
complicated. However, it can be modified easily to solve for the case
which is not a full binary tree. (Read the comments for more details)
一些常见面试题的答案与总结 -
http://www.ihas1337code.com

【在 w*****3 的大作中提到】
: 恩,
: 多谢多谢
:
: next = node;

avatar
b*r
12
btw: you are lucky:)
avatar
w*3
13
明白了~~
多谢两位大牛
avatar
p*g
14
gxgx, 令人振奋, 多谢.
avatar
s*n
15
我写了个练手的,可以处理non-full binary tree。几个要点:
1.把parent node传给recursive function
2.每次recursive call只负责连接当前root。因为parent node作为参数传进来了,我
可以access parent's next link。并且这个时候所有上层的next links都已经连接好
了。
3.左右子树分别递归处理。先处理右子树,再处理左子树。
public void AddNextLink(Tree tree)
{
if (tree.Root == null)
{
return;
}
tree.Root.Next = null;
this.AddNextLink(tree.RightTree, tree, false);
this.AddNextLink(tree.LeftTree, tree, true);
}
private void AddNextLink(Tree subTree, Tree parent, bool
isLeftSubTree)
{
if (subTree == null || subTree.Root == null)
{
return;
}
Node upLevel = parent.Root;
Node next = null;
if (isLeftSubTree) // if I'm left child, need to check parent's
right.
{
next = upLevel.Right;
}
if (next != null) // meaning I am the left child, and parent has
the right child, so simply point to parent's right child.
{
subTree.Root.Next = next;
}
else // either I am the right child, or I am left but parent
doesn't have right child, so start looking for parent's next.
{
upLevel = upLevel.Next;
while (upLevel != null)
{
if (upLevel.Left != null)
{
next = upLevel.Left;
break;
}
else if (upLevel.Right != null)
{
next = upLevel.Right;
break;
}
upLevel = upLevel.Next;
}
subTree.Root.Next = next;
}
this.AddNextLink(subTree.RightTree, subTree, false);
this.AddNextLink(subTree.LeftTree, subTree, true);
}
}

【在 w*****3 的大作中提到】
: Binary tree,populate a next point in each node
: http://www.careercup.com/question?id=8714942
: 用queue的应该很简单,
: 但要求no queue/no stack/O(n)
: 觉得因该是个递归,
: 但是弄了半天没弄出来
: any idea?

avatar
l*t
16
cong

【在 S*****0 的大作中提到】
: 今天刚收到email,NOID回复交上去一个来月,EB1a I-140 has been approved。感谢
: Zac Liu律师事务所, 特别是Christina Le律师的专业帮助。 也感谢版上的Laoda,
: doubleminute提供的回复模板。谢谢大家的帮助和支持。
: 由于是和律师签了保密协议,PL 和 NOID reponse letter不方便与大家分享,万谅。
: 总的感觉是凡是都有可能,尽力而为。

avatar
q*x
17
题无聊。真假难说。

【在 w*****3 的大作中提到】
: Binary tree,populate a next point in each node
: http://www.careercup.com/question?id=8714942
: 用queue的应该很简单,
: 但要求no queue/no stack/O(n)
: 觉得因该是个递归,
: 但是弄了半天没弄出来
: any idea?

avatar
r*5
18
GXGX
avatar
w*3
19
en, 不错,
学习了

【在 s****n 的大作中提到】
: 我写了个练手的,可以处理non-full binary tree。几个要点:
: 1.把parent node传给recursive function
: 2.每次recursive call只负责连接当前root。因为parent node作为参数传进来了,我
: 可以access parent's next link。并且这个时候所有上层的next links都已经连接好
: 了。
: 3.左右子树分别递归处理。先处理右子树,再处理左子树。
: public void AddNextLink(Tree tree)
: {
: if (tree.Root == null)
: {

avatar
h*5
20
Congrats!

【在 S*****0 的大作中提到】
: 今天刚收到email,NOID回复交上去一个来月,EB1a I-140 has been approved。感谢
: Zac Liu律师事务所, 特别是Christina Le律师的专业帮助。 也感谢版上的Laoda,
: doubleminute提供的回复模板。谢谢大家的帮助和支持。
: 由于是和律师签了保密协议,PL 和 NOID reponse letter不方便与大家分享,万谅。
: 总的感觉是凡是都有可能,尽力而为。

avatar
l*o
21
big cong

【在 S*****0 的大作中提到】
: 今天刚收到email,NOID回复交上去一个来月,EB1a I-140 has been approved。感谢
: Zac Liu律师事务所, 特别是Christina Le律师的专业帮助。 也感谢版上的Laoda,
: doubleminute提供的回复模板。谢谢大家的帮助和支持。
: 由于是和律师签了保密协议,PL 和 NOID reponse letter不方便与大家分享,万谅。
: 总的感觉是凡是都有可能,尽力而为。

avatar
C*l
22
祝贺!

【在 S*****0 的大作中提到】
: 今天刚收到email,NOID回复交上去一个来月,EB1a I-140 has been approved。感谢
: Zac Liu律师事务所, 特别是Christina Le律师的专业帮助。 也感谢版上的Laoda,
: doubleminute提供的回复模板。谢谢大家的帮助和支持。
: 由于是和律师签了保密协议,PL 和 NOID reponse letter不方便与大家分享,万谅。
: 总的感觉是凡是都有可能,尽力而为。

avatar
l*9
23
恭喜,恭喜!
楼主rp好啊~

【在 S*****0 的大作中提到】
: 今天刚收到email,NOID回复交上去一个来月,EB1a I-140 has been approved。感谢
: Zac Liu律师事务所, 特别是Christina Le律师的专业帮助。 也感谢版上的Laoda,
: doubleminute提供的回复模板。谢谢大家的帮助和支持。
: 由于是和律师签了保密协议,PL 和 NOID reponse letter不方便与大家分享,万谅。
: 总的感觉是凡是都有可能,尽力而为。

avatar
N*9
24
不发包子也恭喜了

【在 S*****0 的大作中提到】
: 今天刚收到email,NOID回复交上去一个来月,EB1a I-140 has been approved。感谢
: Zac Liu律师事务所, 特别是Christina Le律师的专业帮助。 也感谢版上的Laoda,
: doubleminute提供的回复模板。谢谢大家的帮助和支持。
: 由于是和律师签了保密协议,PL 和 NOID reponse letter不方便与大家分享,万谅。
: 总的感觉是凡是都有可能,尽力而为。

avatar
d*o
25
cong!
avatar
S*0
26
谢谢!好好准备,你会通过的。如果觉得没把握,请个律师帮忙也是好的。

【在 p***g 的大作中提到】
: gxgx, 令人振奋, 多谢.
avatar
l*b
27
恭喜啦!

【在 S*****0 的大作中提到】
: 今天刚收到email,NOID回复交上去一个来月,EB1a I-140 has been approved。感谢
: Zac Liu律师事务所, 特别是Christina Le律师的专业帮助。 也感谢版上的Laoda,
: doubleminute提供的回复模板。谢谢大家的帮助和支持。
: 由于是和律师签了保密协议,PL 和 NOID reponse letter不方便与大家分享,万谅。
: 总的感觉是凡是都有可能,尽力而为。

avatar
l*b
28
考古了一下,你的背景超强啊,怎么居然会被noid呢?

【在 S*****0 的大作中提到】
: 今天刚收到email,NOID回复交上去一个来月,EB1a I-140 has been approved。感谢
: Zac Liu律师事务所, 特别是Christina Le律师的专业帮助。 也感谢版上的Laoda,
: doubleminute提供的回复模板。谢谢大家的帮助和支持。
: 由于是和律师签了保密协议,PL 和 NOID reponse letter不方便与大家分享,万谅。
: 总的感觉是凡是都有可能,尽力而为。

avatar
p*3
29
恭喜
avatar
R*n
30
GXGX
avatar
u*9
31
gxgx

【在 S*****0 的大作中提到】
: 今天刚收到email,NOID回复交上去一个来月,EB1a I-140 has been approved。感谢
: Zac Liu律师事务所, 特别是Christina Le律师的专业帮助。 也感谢版上的Laoda,
: doubleminute提供的回复模板。谢谢大家的帮助和支持。
: 由于是和律师签了保密协议,PL 和 NOID reponse letter不方便与大家分享,万谅。
: 总的感觉是凡是都有可能,尽力而为。

avatar
b*0
32
big cong

【在 S*****0 的大作中提到】
: 今天刚收到email,NOID回复交上去一个来月,EB1a I-140 has been approved。感谢
: Zac Liu律师事务所, 特别是Christina Le律师的专业帮助。 也感谢版上的Laoda,
: doubleminute提供的回复模板。谢谢大家的帮助和支持。
: 由于是和律师签了保密协议,PL 和 NOID reponse letter不方便与大家分享,万谅。
: 总的感觉是凡是都有可能,尽力而为。

avatar
e*c
33
big cong!
timeline and background please?

【在 S*****0 的大作中提到】
: 今天刚收到email,NOID回复交上去一个来月,EB1a I-140 has been approved。感谢
: Zac Liu律师事务所, 特别是Christina Le律师的专业帮助。 也感谢版上的Laoda,
: doubleminute提供的回复模板。谢谢大家的帮助和支持。
: 由于是和律师签了保密协议,PL 和 NOID reponse letter不方便与大家分享,万谅。
: 总的感觉是凡是都有可能,尽力而为。

avatar
g*i
34
祝福!

【在 S*****0 的大作中提到】
: 今天刚收到email,NOID回复交上去一个来月,EB1a I-140 has been approved。感谢
: Zac Liu律师事务所, 特别是Christina Le律师的专业帮助。 也感谢版上的Laoda,
: doubleminute提供的回复模板。谢谢大家的帮助和支持。
: 由于是和律师签了保密协议,PL 和 NOID reponse letter不方便与大家分享,万谅。
: 总的感觉是凡是都有可能,尽力而为。

avatar
s*a
35
cong

【在 S*****0 的大作中提到】
: 今天刚收到email,NOID回复交上去一个来月,EB1a I-140 has been approved。感谢
: Zac Liu律师事务所, 特别是Christina Le律师的专业帮助。 也感谢版上的Laoda,
: doubleminute提供的回复模板。谢谢大家的帮助和支持。
: 由于是和律师签了保密协议,PL 和 NOID reponse letter不方便与大家分享,万谅。
: 总的感觉是凡是都有可能,尽力而为。

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