Insert words sequentially into BST.
banana → root
peach → right of banana
apple → left of banana
pear → right of peach
coconut → left of peach
mango → right of coconut
papaya → right of mango
Longest path:
banana → peach → coconut → mango → papaya
Number of edges = 4
Online Test Series, Information About Examination,
Syllabus, Notification
and More.
Online Test Series, Information About Examination,
Syllabus, Notification
and More.