diff options
-rw-r--r-- | trees.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -6,7 +6,7 @@ #include "trees.h" -/* addtree, adds a node containing token, at or below p */ +/* adds a node containing token, at or below p */ struct tnode *bintree_insert(struct tnode *p, char *t) { int cond; @@ -20,9 +20,9 @@ struct tnode *bintree_insert(struct tnode *p, char *t) } else if ((cond = strcmp(t, p->text)) == 0) p->count++; - else if (cond < 0) /* go the the left subtree */ + else if (cond < 0) /* go to the left subtree */ p->left = bintree_insert(p->left, t); - else + else /* go to the right subtree */ p->right = bintree_insert(p->right, t); return p; |