This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Binary Tree traversal

 
Alec Sultana
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello and Happy new Year ^^

For my school assignment I built myself an AVL tree - it works as intended, however I need to represent the nodes and Data into Left-Data-Right representation, But I have no idea how to do it.

Left-Data-Right representation should be 3 columns. Left subtree's Data - current Node Data - Right subtree Data



Any suggestions would be appreciated

Thanks
 
Campbell Ritchie
Sheriff
Pie
Posts: 47274
52
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Do you mean an in‑order depth traversal? You don’t usually print that in columns, but the principles are easy:-You can get different traversals by altering the order of parts 1 2 and 3
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic