Traverse Binary Tree in Inorder

Design a conventional iterative algorithm to traverse a binary tree represented in linked lists in inorder.

Questions by Dheerendra_juli

Showing Answers 1 - 3 of 3 Answers

ChrisL216

  • Dec 13th, 2009
 

void display(){
    System.out.print(lnr(root));
}

void lnr(Node p){      // left node right
    if(p == null) return;
    lnr(p.left);
    System.out.print(p.key);
    lnr(p.right);
}

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions