Skip to content

Conversation

@Zzz212zzZ
Copy link
Contributor

添加双头链表的解法,相比于单链表:

  • deleteAtIndex只需要O(1)的时间复杂度,更加节省时间
  • 相应地,节点除了next指针,还需要维护prev指针

同时在代码中添加了相应的注释和function header

@youngyangyang04 youngyangyang04 merged commit d1419b1 into youngyangyang04:master Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants