I'm trying to convert a list-based tree implementation into an array-based implementation with the parent at the ith index, left child at 2ith index and right child at 2i+1th index. for some reason the conversion results in loss of data for trees with bigger number of nodes. I'd like to know what all boundary conditions i need to check for while implementing this. Thanks!
listandarraysuggest you already have a language in mind. Perhaps you can tag your question with that language?