92. Reverse Linked List II.java - public class Solution cfw public ListNode reverseBetween(ListNode head int m int n cfw ListNode dummy = new ListNode(0

92. Reverse Linked List II.java - public class Solution cfw...

This preview shows page 1 out of 1 page.

public class Solution { public ListNode reverseBetween(ListNode head, int m, int n) { ListNode dummy = new ListNode(0); dummy.next = head; ListNode pre = dummy; for (int i = 1; i < m; i++) { pre = pre.next; } ListNode start = pre.next;
Image of page 1

You've reached the end of your free preview.

Want to read the whole page?

  • Spring '18
  • Subroutine, public class Solution

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes