Skip to content

Commit

Permalink
Merge pull request youngyangyang04#2497 from WilsonKuo/patch-1
Browse files Browse the repository at this point in the history
Update 0203.移除链表元素.md
  • Loading branch information
youngyangyang04 authored Apr 29, 2024
2 parents c89040c + 92850e8 commit c94895d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion problems/0203.移除链表元素.md
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ impl Solution {
let mut dummyHead = Box::new(ListNode::new(0));
dummyHead.next = head;
let mut cur = dummyHead.as_mut();
// 使用take()替换std::men::replace(&mut node.next, None)达到相同的效果,并且更普遍易读
// 使用take()替换std::mem::replace(&mut node.next, None)达到相同的效果,并且更普遍易读
while let Some(nxt) = cur.next.take() {
if nxt.val == val {
cur.next = nxt.next;
Expand Down

0 comments on commit c94895d

Please sign in to comment.