d*****h 发帖数: 8 | 1 Dear Colleagues,
I want to ask an algorithm question:
Given a vector of int, which is the output of level first traversal of a
binary search tree, build the original BST. O(n) time complexity is required.
Thanks,
dbtouch | c*******4 发帖数: 51 | 2 question, how the vector represent level like this:
1
\
4
/\
2 6
\
3
required.
【在 d*****h 的大作中提到】 : Dear Colleagues, : I want to ask an algorithm question: : Given a vector of int, which is the output of level first traversal of a : binary search tree, build the original BST. O(n) time complexity is required. : Thanks, : dbtouch
|
|