回答編集履歴

1

修整

2021/04/19 19:26

投稿

modieu
modieu

スコア282

test CHANGED
@@ -4,17 +4,15 @@
4
4
 
5
5
  function reverse(rev,head){
6
6
 
7
- if(head==null){
7
+ if(head==null)
8
8
 
9
- return rev
9
+ return rev;
10
10
 
11
- }
11
+ next=head.next;
12
12
 
13
- next=head.next
13
+ head.next=rev;
14
14
 
15
- head.next=rev
16
-
17
- return reverse(head,next)
15
+ return reverse(head,next);
18
16
 
19
17
  }
20
18