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

Commit29d8cdb

Browse files
authored
Easy
1 parent5cad09f commit29d8cdb

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
3+
// Complete the printLinkedList function below.
4+
5+
/*
6+
* For your reference:
7+
*
8+
* SinglyLinkedListNode {
9+
* int data;
10+
* SinglyLinkedListNode next;
11+
* }
12+
*
13+
*/
14+
staticvoidprintLinkedList(SinglyLinkedListNodehead) {
15+
while(head!=null){
16+
System.out.println(head.data);
17+
head=head.next;
18+
}
19+
20+
}
21+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp