Redian新闻
>
FIA的信用卡没有立刻批
avatar
FIA的信用卡没有立刻批# Money - 海外理财
x*s
1
how to serialize and deserialize a n ary tree?
avatar
b*g
2
那位老大给提供的电话b吧,thanks
avatar
g*x
3
如果是binary的话inorder+preorder或inorder+postorder
n-nary存(node, parent) pair貌似可以,不知道有什么更好的方法
avatar
L*S
4
申卡立即打电话是坏习惯,坏风气。。。
你等个2-3天再打吧。

【在 b****g 的大作中提到】
: 那位老大给提供的电话b吧,thanks
avatar
s*g
6
FIA问题不大
而且这个是查status或者quick decision,不是recon
(我怎么记得FIA pending的话提示可以打电话for instant decision的)
1-888-503-6090

【在 L*S 的大作中提到】
: 申卡立即打电话是坏习惯,坏风气。。。
: 你等个2-3天再打吧。

avatar
p*r
7
序列化成前序和中序

【在 x*********s 的大作中提到】
: how to serialize and deserialize a n ary tree?
avatar
g*x
8
LZ问的是N叉树,不一定能用中序遍历
avatar
s*l
9

注意二叉树不同节点内容可能有重复,比如
inorder: [1,1,1,1,1,1,1]
preorder: [1,1,1,1,1,1,1]

【在 g*****x 的大作中提到】
: 如果是binary的话inorder+preorder或inorder+postorder
: n-nary存(node, parent) pair貌似可以,不知道有什么更好的方法

avatar
j*x
10
Do a pre-order traversal, after the traversing of a subtree, record the size
of the subtree with that node. Got some thing like this:
serialized_node,size_of_the_sub_tree_rooted_at_this_node,node,size
A recursive deserialization process is easy to get.
As for two traversal, I dont get it. Meaning to store two arrays of node
keys? But a serious problem is that we need to traverse twice of the tree.
Not good.
avatar
P*l
11

size
More explanation on the "serialized_node"? Seems you saved redundant info.
No. Only one traversal can obtain both arrays.
The problem of the method is in deserialization. One traversal needs to look
up ids in another one to recover the tree.
I don't think the two traversal method is practical for serialization.

【在 j********x 的大作中提到】
: Do a pre-order traversal, after the traversing of a subtree, record the size
: of the subtree with that node. Got some thing like this:
: serialized_node,size_of_the_sub_tree_rooted_at_this_node,node,size
: A recursive deserialization process is easy to get.
: As for two traversal, I dont get it. Meaning to store two arrays of node
: keys? But a serious problem is that we need to traverse twice of the tree.
: Not good.

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