How to construct a binary tree from sequence of numbers?
Answers
Answered by
0
binary tree can be created by three ways
1)PREORDER
2)INORDER
3)POSTORDER
three components are there LEFT ,RIGHT & ROOT node
now in preorder the sequence is -ROOT,LEFT ,RIGHT
in INORDER
LEFT, ROOT, RIGHT
and in POSTORDER
LEFT RIGHT ROOT
1)PREORDER
2)INORDER
3)POSTORDER
three components are there LEFT ,RIGHT & ROOT node
now in preorder the sequence is -ROOT,LEFT ,RIGHT
in INORDER
LEFT, ROOT, RIGHT
and in POSTORDER
LEFT RIGHT ROOT
Similar questions
Math,
8 months ago
Math,
8 months ago
Computer Science,
8 months ago
Social Sciences,
1 year ago
Math,
1 year ago
Math,
1 year ago