Home > SparkNotes > Computer Science Study Guides > Implementation >

sparknotes

Implementation of Trees


Problems 2

Problem : Use our array implementation to draw the tree that corresponds to the following array:


Problem : What is problematic about the following tree?


#define EMPTY	0

int array[] = {0, 1, EMPTY, 1, 4, 0, EMPTY};


Problem : If you know that a node corresponds to index i the array, what would be the index of its parent?