avatar
Immunology grants# Biology - 生物学
m*e
1
If an inorder traversal on a binary tree gets the elements in sorted order,
does it necessarily prove it is a binary search tree?
avatar
s*y
2
Anyone know grants for post docs over 5 years, without green card?
avatar
g*s
3
a bt is bst iff inorder travesal returns a strictly sorted array.
notice there's trap: if the bt has duplicate elements, it can't be a bst.
but if excluding duplicates, u can use mathematical induction to prove it.

order,

【在 m*****e 的大作中提到】
: If an inorder traversal on a binary tree gets the elements in sorted order,
: does it necessarily prove it is a binary search tree?

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