private static int[] mergeSort(int[] list) {
		if (list.length == 1) {
			return list;
		}
		int len = list.length;
		int leftLen = len / 2;
		int middle = len - leftLen;
		int[] left = new int[leftLen];
		int[] right = new int[middle];
		for (int i = 0; i < leftLen; i++) {
			left[i] = list[i];
			right[i] = list[i + leftLen];
		}
		if (len % 2 == 1) {
			right[middle - 1] = list[len - 1];
		}
		left = mergeSort(left);
		right = mergeSort(right);
		return merge(left, right);
	}