int main() { Node list; list.AppendAtEnd(12); list.AppendAtEnd(20); //list.AppendAtEnd(30); list.AppendAtEnd(40); list.Print(); list.Delete(12); //list.Delete(30); list.Delete(400); //list.Delete(20); list.Print(); return 0; }
const std::pair<Node::KEY, bool> Chord::Delete(const std::string &str) { if (nodes.empty()) return std::make_pair(0, false); Node *startNode = nodes.begin()->second; return std::make_pair(startNode->Delete(str), true); }