Inorder tree traversal: Which definition is correct?

前端 未结 14 1345
轮回少年
轮回少年 2020-12-24 03:42

I have the following text from an academic course I took a while ago about inorder traversal (they also call it pancaking) of a binary tree (not BST):

14条回答
  •  滥情空心
    2020-12-24 04:21

    I think the first binary tree with the root of a is a Binary tree which is not correctly constructed.

    Try to implement so that all the left side of the tree is less than the root and all the right side of the tree is greater than or equal to the root.

提交回复
热议问题