Anonymous
public c v1 · immutablenode current = root;int temp = count+1;int i=0, j, steps=31;while ( !(0x80000000&temp) ) { ++i; temp<<1;}steps -= i;for (j=0;j<steps-1;++j) { if ( (0x80000000&temp) ) { current = current->right; printf("right\n"); } else { current = current->left; printf("left\n"); } temp<<1;}if ( (0x80000000&temp) ) { current->right = newNode; printf("right gets newNode\n");} else { current->left = newNode; printf("left gets newNode\n");}