Skip to content

Commit

Permalink
Merge pull request youngyangyang04#1137 from Aaron-Lin-74/patch-1
Browse files Browse the repository at this point in the history
Update 0203.移除链表元素.md
  • Loading branch information
youngyangyang04 authored Mar 23, 2022
2 parents 759175a + cc302a9 commit 5a7ab02
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 @@ -324,7 +324,7 @@ function removeElements(head: ListNode | null, val: number): ListNode | null {
head = head.next;
}
if (head === null) return head;
let pre: ListNode = head, cur: ListNode = head.next;
let pre: ListNode = head, cur: ListNode | null = head.next;
// 删除非头部节点
while (cur) {
if (cur.val === val) {
Expand Down

0 comments on commit 5a7ab02

Please sign in to comment.