public void connect(TreeLinkNode root) {
		TreeLinkNode cur = root;
		while(cur != null) {
			TreeLinkNode nextStart = null, prev = null;
			for( ; cur != null; cur = cur.next) {
				if(nextStart == null) 
					nextStart = (cur.left != null) ? cur.left : cur.right;
				
				if(cur.left != null) {
					if(prev != null) prev.next = cur.left;
					prev = cur.left;
				}
				
				if(cur.right != null) {
					if(prev != null) prev.next = cur.right;
					prev = cur.right;
				}
			}
			cur = nextStart;
		}
	}