0

I faced a question to construct a binary tree using some image representation. I got images of 3 binary trees and I had to convert it into a java program. I couldn't do it, because I was not even getting where to start. I don't have exact images but I am attaching some, based on those. I hope some one can guide me, it will be of great help. Thank you in advance.

Please note the images I am attaching are not exactly same, I am attaching just to get Idea. Images

radiantshaw
  • 535
  • 1
  • 5
  • 18
Mansingh Kachhi
  • 87
  • 2
  • 2
  • 9
  • 2
    Where to start? Well, you need to create a class allowing to store that kind of binary tree. The simplest way being a node with a value, and two child nodes (left and right). – JB Nizet Aug 14 '18 at 06:02
  • I don't know about anybody else, but I don't see any images. Clicking on that link gives me a page that's all black. – Jim Mischel Aug 14 '18 at 18:09
  • It's not even clear what you're asking. You want a program that will scan an image and create a binary tree from it? I wouldn't know how to convert an image into a java program, either. Can you explain more clearly what you're trying to do? – Jim Mischel Aug 14 '18 at 18:11
  • Do read basics about how binary tree and tree node is represented in the form of classes. Go through this SO answer https://stackoverflow.com/questions/20731833/constructing-a-binary-tree-in-java – Pramod Aug 15 '18 at 13:02

0 Answers0