If the tree is not a complete binary tree then what changes can be made for easy access of children of a node in the array?

Question:If the tree is not a complete binary tree then what changes can be made for easy access of children of a node in the array?

1.every node stores data saying which of its children exist in the array

2.no need of any changes continue with 2w and 2w+1, if node is at i

3.keep a seperate table telling children of a node

4.use another array parallel to the array with tree


Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!