由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - Serialize a binary tree to a linked list
相关主题
问一道算法题how to judge a linked list is palindrome?
如何 serialization 和deserialization hash table ?How to serialize and deserialize
F家phone interview的一道题面经+求助
Deserialize in-order array to a minimum height binary tree.请教一下超大图的存储问题
求个java版本的binary tree serialization和deserializationSerialization/Deserialization of a Binary Tree
Google第二次电面刚拿到A公司的offer,呈上面经
问道Binary tree serialization/de-serialization的题弱弱的问关于二叉树的问题
啥叫encode/decode binary tree啊?A家面经, offer, 请教Negotiation
相关话题的讨论汇总
话题: tree话题: linked话题: serialize话题: list话题: binary
进入JobHunting版参与讨论
1 (共1页)
s******d
发帖数: 61
1
in order traversal 然后一个一个list.add() 到linked list?
感觉太简单了,有什么问题吗?
V*******g
发帖数: 678
2
use preoder traversal. That can recover an exact copy of your tree later.
m**q
发帖数: 189
3
Preorder traversal result cannot uniquely identify the original tree
structure unless it is a BST, or you insert special node into the list
to represent NULL in the tree.
ihas1337code has a good example of how to make a double linked list
out of a binary tree, and is in-place.

【在 V*******g 的大作中提到】
: use preoder traversal. That can recover an exact copy of your tree later.
s******d
发帖数: 61
4
看到了,可以插进去特别标示符,
可以用来deserialize
1 (共1页)
进入JobHunting版参与讨论
相关主题
A家面经, offer, 请教Negotiation求个java版本的binary tree serialization和deserialization
Phone interview questionGoogle第二次电面
怎样serialize binary tree 比较好?问道Binary tree serialization/de-serialization的题
请教一道leetcode的题目啥叫encode/decode binary tree啊?
问一道算法题how to judge a linked list is palindrome?
如何 serialization 和deserialization hash table ?How to serialize and deserialize
F家phone interview的一道题面经+求助
Deserialize in-order array to a minimum height binary tree.请教一下超大图的存储问题
相关话题的讨论汇总
话题: tree话题: linked话题: serialize话题: list话题: binary