public ListNode partition(ListNode head, int x) {
		ListNode dummyBack = new ListNode(0);
		ListNode dummyFront = new ListNode(0);
		dummyBack.next = head;

		ListNode p1 = dummyBack, p2 = dummyFront;
		// 1. go from dummy
		// 2. use p1.next != null
		// can avoid using pre-pointer
		while(p1.next != null){
			if(p1.next.val < x){
				p2.next = p1.next;
				p2 = p2.next;
				p1.next = p1.next.next;
			}else{
				p1 = p1.next;
			}
		}
		p2.next = dummyBack.next;
		return dummyFront.next;
	}