tests/java/src/reverseLinkedList/ListNode.java
public static ListNode arrayToList(int[] array) {
		ListNode head = new ListNode(0);
		ListNode p = head;
		for (int i : array) {
			p.next = new ListNode(i);
			p = p.next;
		}
		return head.next;
	}
/**
	 * This is an assistant function, use it, we can create a linkedList by array.
	 */
This is an assistant function, use it, we can create a linkedList by array.
This is an assistant function use it we can create a linkedList by array .
public static ListNode arrayToList(int[] array) {
		ListNode head = new ListNode(0);
		ListNode p = head;
		for (int i : array) {
			p.next = new ListNode(i);
			p = p.next;
		}
		return head.next;
	}
public static ListNode arrayToList ( int [ ] array ) { ListNode head = new ListNode ( 0 ) ; ListNode p = head ; for ( int i : array ) { p . next = new ListNode ( i ) ; p = p . next ; } return head . next ; }
This is an assistant function, use it, we can create a linkedList by array.
This is an assistant function use it we can create a linkedList by array .