我告诉自己,自己写的这个一定要记录下来,,,不为别的,只是因为我太憨了。这个题我一开始的想法,是根据这一条链表,反转新建一条新链表,然后两个开始遍历,结果后来发现,在反转的时候head这个链表就已经发生改变了,虽然我ListNode op = head,但是这个op还是在操作head。并没有重新建一 Read More
posted @ 2021-08-25 18:39
K峰
Views(60)
Comments(0)
Diggs(0)
/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode() {} * ListNode(int val) { this.val = val; } Read More
posted @ 2021-08-25 16:07
K峰
Views(81)
Comments(0)
Diggs(0)
/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode() {} * ListNode(int val) { this.val = val; } Read More
posted @ 2021-08-25 11:27
K峰
Views(28)
Comments(0)
Diggs(0)
/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int x) { * val = x; * next = null; * } * } * Read More
posted @ 2021-08-25 11:11
K峰
Views(34)
Comments(0)
Diggs(0)
/** * Definition for singly-linked list. * class ListNode { * int val; * ListNode next; * ListNode(int x) { * val = x; * next = null; * } * } */ publi Read More
posted @ 2021-08-25 10:46
K峰
Views(240)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号