Thursday, December 22, 2011

Serialization/Deserialization of a BT/BST

1 comment:

  1. int diameter(struct node *t){
    if(t==NULL) return 0;
    return max( height(t->left) + height(t->right) +1 , max(diameter(t->left), diameter(t->right)) );
    }

    ReplyDelete