All pastes #753478 Raw Edit

Anonymous

public c v1 · immutable
#753478 ·published 2007-10-29 08:43 UTC
rendered paste body
node 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,temp<<1) {   if ( (0x80000000&temp) ) {      current = current->right;      printf("right\n");   } else {      current = current->left;      printf("left\n");   }}if ( (0x80000000&temp) ) {   current->right = newNode;   printf("right gets newNode\n");} else {   current->left = newNode;   printf("left gets newNode\n");}