public ListNode rotateRight2(ListNode head, int n) {
		// IMPORTANT: Please reset any member data you declared, as
		// the same Solution instance will be reused for each test case.
		if (head == null)
			return null;
		ListNode front = head;
		ListNode rear = head;
		ListNode preFront = head;
		ListNode preRear = head;
		for (int i = 0; i < n && front != null; ++i) {
			preFront = front;
			front = front.next;
		}
		if (front == null || n == 0) {
			return head;
		}
		while (front != null) {
			preFront = front;
			front = front.next;
			preRear = rear;
			rear = rear.next;
		}
		preFront.next = head;
		preRear.next = null;
		head = rear;
		return head;
	}