Redian新闻
>
请问铺在raised bed 底下的黑色塑料布英文是什么?
avatar
请问铺在raised bed 底下的黑色塑料布英文是什么?# gardening - 拈花惹草
i*t
1
第一次用电的
1 那个pressure limitvalue 似乎放上去 不太固定啊 可以随便转动。 就那么放着??
2 时间到了以后 怎么放气啊?
自动 提示? 还是手工啊
请指教一下 谢谢
avatar
K*g
2
把一个BST in-place变成双向链表,
right指向后边,left指向前一个。
下面是调用函数的代码,假设已经有了个root
这个代码有问题,但是调了好久,都没有调出来
NODE head_node;
NODE* head = &head_node;
NODE** last = BSTtoDLL(root, head);
(*last)->right = NULL;
head = head_node.right;
head->left = NULL;
NODE** BSTtoDLL(NODE* &node, NODE* &list)
{
if(node==NULL) return NULL;
NODE** rtn_list = BSTtoDLL(node->left, list);
if(rtn_list == NULL)
{
list->right = node;
node->left = list;
}
else
{
(*rtn_list)->right = node;
avatar
o*t
3
我的EB3 的140 批准并因大潮拿到AP, EAD, 最近又递了NIW, 140 是pending.
我准备用AP 出境对NIW 是否有影响?
avatar
p*4
4
在哪里有卖的?谢谢!
avatar
E*A
5
是instant pot 吗
avatar
p*r
6
没看懂为什么要Node**

【在 K******g 的大作中提到】
: 把一个BST in-place变成双向链表,
: right指向后边,left指向前一个。
: 下面是调用函数的代码,假设已经有了个root
: 这个代码有问题,但是调了好久,都没有调出来
: NODE head_node;
: NODE* head = &head_node;
: NODE** last = BSTtoDLL(root, head);
: (*last)->right = NULL;
: head = head_node.right;
: head->left = NULL;

avatar
M*u
7
Landscape fabric? I used hardware cloth instead.
avatar
g*e
8
发一个我昨天写的
private static void join(Node a, Node b) {
a.right = b;
b.left = a;
}

/**
helper function -- given two circular doubly linked
lists, append them and return the new list.
*/
private static Node append(Node a, Node b) {
if (a==null) return b;
if (b==null) return a;

Node aLast = a.left;
Node bLast = b.left;


【在 K******g 的大作中提到】
: 把一个BST in-place变成双向链表,
: right指向后边,left指向前一个。
: 下面是调用函数的代码,假设已经有了个root
: 这个代码有问题,但是调了好久,都没有调出来
: NODE head_node;
: NODE* head = &head_node;
: NODE** last = BSTtoDLL(root, head);
: (*last)->right = NULL;
: head = head_node.right;
: head->left = NULL;

avatar
h*d
9
今天在walmart看到, 大约3x100ft 一块20.
avatar
Z*Z
10
这个不错。赞一个。
我原来写过一个dsw,发现java不能传递指针引用太痛苦了

【在 g**e 的大作中提到】
: 发一个我昨天写的
: private static void join(Node a, Node b) {
: a.right = b;
: b.left = a;
: }
:
: /**
: helper function -- given two circular doubly linked
: lists, append them and return the new list.
: */

avatar
q*i
11
sams 4×225 29.99
avatar
l*q
12
首先你的list不断后移,最后全返回了,你再走到头?
其次,当一个点有左右儿子的时候,貌似你的右儿子自己不是NULL的时候就没有被
append上去啊
rtn_list = BSTtoDLL(node->right, node);
if(rtn_list == NULL)
{
return &node;
}
else
{
return rtn_list;
}
写代码一般是从拙入巧的,慢慢改进,一下子写很巧妙的代码会很容易错的
这里有现成的代码
http://cslibrary.stanford.edu/109/TreeListRecursion.html
因为double linked list操作有对称性,它是把tree转成了circular的double list
最后要把头尾break才是你要的
avatar
e*9
13
必须要铺吗?

【在 q**i 的大作中提到】
: sams 4×225 29.99
avatar
J*e
14
NODE** BSTtoDLL(NODE* &node, NODE* &list)
如果没有理解错误的话,lz定义的这个递归函数是要将以node为根节点的BST转化为DLL
,将其链接到list节点之后,并返回新的DLL尾节点。那么问题在于,在程序中,当左
子树返回的链表不为空的时候,并没有操作将其链接到list上。
指针跟应用的用法可能还要加强一下。
avatar
a*a
15
dollar tree 4x8 one dollar
avatar
B*y
16


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