Deleting the lowest value in a binary search tree
问题 I wrote this and somehow it's ending up deleting all my left side on the tree not only the most left leaf. I can't find my mistake, can someone help? struct Node *delMin(struct Node **root) { struct Node *current = *root; struct Node *b4Current; while ((current->m_ls) == NULL) { b4Current = current; current = current->m_ls; } if ((current->m_rs) == NULL) { b4Current->m_ls = 0; free(current); } else { b4Current->m_ls = current->m_rs; free(current); } return *root; } 回答1: Let's look at your