JavaFamilyTree
Java based program to decipher family tree
Follow the steps below to test it
- Construct a family tree that needs to decoded/represented using the Java code. The family tree is constructed using '|' as delimiter for nodes and within node, use ',' to represent 'parentId','nodeId' and 'name' An example of such tree in java string is "null,0,grandpa|0,1,son|0,2,daugther|1,3,grandkid|1,4,grandkid|2,5,grandkid|5,6,greatgrandkid"
- Refer the BuildSampleTree to test/build the tree in java
- Instantiate the BuildFamilyTree and call buildTree(String arg) method by providing the family tree in form String as input.