Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit426c041

Browse files
refactor 83
1 parent48d17b0 commit426c041

File tree

1 file changed

+3
-3
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+3
-3
lines changed

‎src/main/java/com/fishercoder/solutions/_83.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
publicclass_83 {
66
publicstaticclassSolution1 {
77
publicListNodedeleteDuplicates(ListNodehead) {
8-
ListNoderet =newListNode(-1);
9-
ret.next =head;
8+
ListNodepre =newListNode(-1);
9+
pre.next =head;
1010
while (head !=null) {
1111
while (head.next !=null &&head.next.val ==head.val) {
1212
head.next =head.next.next;
1313
}
1414
head =head.next;
1515
}
16-
returnret.next;
16+
returnpre.next;
1717
}
1818
}
1919

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp