public treeNode sortedArrayToBST(int[] num) {
		// put all nodes in an arrayList with originally ascending order;
		ArrayList<Integer> nodeList = new ArrayList<Integer>();

		for (int i = 0; i < num.length; i++) {
			nodeList.add(new Integer(num[i]));
		}

		return generateBalancedBST(nodeList, 0, nodeList.size() - 1);
	}