Name: Anonymous 2016-01-05 0:44
Except than being too lazy to use arrays? The amount of cache misses you are going to get overweights the other benefits.
struct Node {
int val;
int left;
int right;
} nodes[10];
Infrequent appending/removingYou mean frequent and in the middle or start.
Yes.here is a better one more fitting into the array spirit
struct Node
{
int val;
bool hasLeft, hasRight;
};