l*o
2 楼
600块的时候动了一下心思,没short它。
我觉得它er前可能可以short了。。。
我觉得它er前可能可以short了。。。
g*y
3 楼
6,6+太大了,准备等6S了
d*0
5 楼
最近百度和google到底有什么新闻啊,那不都3个月以前的事了么?
f*w
9 楼
一般问这个题都是不能新建node吧
T*e
12 楼
应该不需要。
void bstToDListHelper(Node *cur, Node *&head, Node *&pre){
if(!cur) return;
bstToDListHelper(cur->left, head, pre);
cur->left=pre;
if(pre){
pre->right=cur;
}else{
head=cur;
}
pre=cur;
bstToDListHelper(cur->right, head, pre);
}
Node *bstToDList(Node *root){
if(!root) return NULL;
Node *head=NULL, *pre=NULL;
bstToDListHelper(root, head, pre);
return head;
}
【在 l*****a 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: 这种题需要新建Node吗?
: 还是说node.left 相当于 node.previous
: node.right相当于node.next
void bstToDListHelper(Node *cur, Node *&head, Node *&pre){
if(!cur) return;
bstToDListHelper(cur->left, head, pre);
cur->left=pre;
if(pre){
pre->right=cur;
}else{
head=cur;
}
pre=cur;
bstToDListHelper(cur->right, head, pre);
}
Node *bstToDList(Node *root){
if(!root) return NULL;
Node *head=NULL, *pre=NULL;
bstToDListHelper(root, head, pre);
return head;
}
【在 l*****a 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 这种题需要新建Node吗?
: 还是说node.left 相当于 node.previous
: node.right相当于node.next
s*x
13 楼
http://www.geeksforgeeks.org/merge-two-balanced-binary-search-t
Method 3
★ 发自iPhone App: ChineseWeb 8.7
【在 s**x 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: Yes. Google, you can find a lot of solutions online.
: Stanford univ has a class paper for this.
: The question is how to merger two binary search tree.
:
: ★ 发自iPhone App: ChineseWeb 8.7
Method 3
★ 发自iPhone App: ChineseWeb 8.7
【在 s**x 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: Yes. Google, you can find a lot of solutions online.
: Stanford univ has a class paper for this.
: The question is how to merger two binary search tree.
:
: ★ 发自iPhone App: ChineseWeb 8.7
相关阅读
Nook Simple Touch能看中文不?nexus 47号定的Lumia 920 黄色,有人的order状态是发货吗?用T-Mobile的Note2有两大郁闷之处nexus 4何时能有货呀用ios和用android钓丝为什么安卓的系统语言中没有中文?iphone5 vs blackberry下午online activate的lumia 920galaxy nexus 升级4.2后屏幕总是自己亮一下除了ATT,哪里可以买到lumia920啊?求推荐电池最好的智能手机请问lumia 920有任务管理器之类的么?现在有啥100美元以下的老款智能手机也来说说单手操作为啥nexus 7没人买,nexus 4抢光了Nexus 4 耐摔不?Onenote在移动设备上的应用怎么这么差劲?$199入了NoteIIMS难道做一个可靠的Skype for WP有那么难吗