We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
void insert(int val) { auto node = std::make_shared<Node>(val); node->next = next; node->prev = prev; if (prev) prev->next = node; if (next) next->prev = node; }
在this节点处插入一个节点node(val),this的前驱改了,后继改了; 然而this节点没有做任何处理,消失在了虚空之中,或者说永远的留在了虚空之中。
还是说把它改正确也是作业的一部分,但是作业完全没提。 不过我看了一下,这个函数完全没用上。
The text was updated successfully, but these errors were encountered:
我也完全没用到这个函数
Sorry, something went wrong.
我也觉得这里有问题,看了半天没有看明白这个插入节点的操作步骤。
应该是有问题的,直接把当前节点替换了
我也是觉得,不仅是替换了当前数据,还没把this删干净
No branches or pull requests
在this节点处插入一个节点node(val),this的前驱改了,后继改了;
然而this节点没有做任何处理,消失在了虚空之中,或者说永远的留在了虚空之中。
还是说把它改正确也是作业的一部分,但是作业完全没提。
不过我看了一下,这个函数完全没用上。
The text was updated successfully, but these errors were encountered: