Consider a situation of writing a binary tree into a file with memory storage efficiency in mind, is array representation of tree is good?

Question:Consider a situation of writing a binary tree into a file with memory storage efficiency in mind, is array representation of tree is good?

1.yes because we are overcoming the need of pointers and so space efficiency

2.yes because array values are indexable

3.No it is not efficient in case of sparse trees and remaning cases it is fine

4.No linked list representation of tree is only fine


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!