GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Placement Papers  >  Birlasoft

 Print  |  
Question:  How can we insert the following numbrs 7,5,1,8,3,2 in a binary tree so that inorder and preorder traversal is same



June 06, 2006 08:16:46 #4
 coder   Member Since: Visitor    Total Comments: N/A 

RE: how can we insert the following numbrs 7,5,1,8,3,2...
 
inorder = Me Left Rightpreorder = Left Me Rightif inorder == preorderthen Left = Empty Spaceso , we have to insert in order of1,2,3,5,7,8
     

 

Back To Question