86. Partition List.java - public class Solution cfw public ListNode partition(ListNode head int x cfw if(head = null | head.next = null return head

86. Partition List.java - public class Solution cfw public...

This preview shows page 1 out of 1 page.

public class Solution { public ListNode partition(ListNode head, int x) { if (head == null || head.next == null) return head; ListNode first = new ListNode(0); ListNode second = new ListNode(0); ListNode tail = second; first.next = head;
Image of page 1

You've reached the end of your free preview.

Want to read the whole page?

  • Spring '18
  • null || head.next

  • 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