由买买提看人间百态

topics

全部话题 - 话题: dacecf
(共0页)
i****c
发帖数: 102
1
来自主题: JobHunting版 - 问Amazon一组递进面试题
这题有意思!
1)easy, recursive or iterative algorithm
2) preorder+inorder, preorder+marker, level-by-level, etc.
3) I will prefer to use preorder+marker so that we can find the path to
leaves
without constructing trees in memory
A quick thought, we can do serilization by repeating parent nodes (correct
me if you find errors)
e.g., a tree, root is A, A's left is B, right is C, B's right is D, and C's
left and right are E and F respectively.
then we have AB?DACECF, ? indicates a null
4) distribute small... 阅读全帖
p*****a
发帖数: 147
2
来自主题: JobHunting版 - 问Amazon一组递进面试题

s
then we have AB?DACECF, ? indicates a null
~~~~~~~~~~marker是??,这里怎么两个C?
(共0页)