Loading docs/ds/llrbt.md +7 −5 Original line number Diff line number Diff line Loading @@ -76,9 +76,11 @@ } template <class Key, class Compare> typename Set<Key, Compare>::Node_Set<Key, Compare>::insert(Set::Node_root, const Key &key) const {if (root == nullptr) return new Node(key, kRed, 1); if (root->key == key); typename Set<Key, Compare>::Node_Set<Key, Compare>::insert( Set::Node_root, const Key &key) const { if (root == nullptr) return new Node(key, kRed, 1); if (root->key == key) ; else if (cmp\_(key, root->key)) // if (key < root->key) root->lc = insert(root->lc, key); else Loading Loading
docs/ds/llrbt.md +7 −5 Original line number Diff line number Diff line Loading @@ -76,9 +76,11 @@ } template <class Key, class Compare> typename Set<Key, Compare>::Node_Set<Key, Compare>::insert(Set::Node_root, const Key &key) const {if (root == nullptr) return new Node(key, kRed, 1); if (root->key == key); typename Set<Key, Compare>::Node_Set<Key, Compare>::insert( Set::Node_root, const Key &key) const { if (root == nullptr) return new Node(key, kRed, 1); if (root->key == key) ; else if (cmp\_(key, root->key)) // if (key < root->key) root->lc = insert(root->lc, key); else Loading