public static void connect(TreeLinkNode root) {
		if (root == null)
			return;
		ArrayList<TreeLinkNode> queue = new ArrayList<TreeLinkNode>();
		queue.add(root);
		while (!queue.isEmpty()) {
			ArrayList<TreeLinkNode> nextLevel = queue;
			for (int i = 0; i < nextLevel.size() - 2; i++) {
				nextLevel.get(i).next = nextLevel.get(i + 1);
			}
			System.out.println(nextLevel.size());
			nextLevel.get(nextLevel.size() - 1).next = null;
			queue = new ArrayList<TreeLinkNode>();
			queue = getChildren(nextLevel);
		}

	}