public static TreeNode deserialize(String s) {
		// write your code here7
		int[]i={0};
		TreeNode root=decodeHelper(s,i);
		Queue<TreeNode>q=new ArrayDeque<>();
		if (root!=null)
			q.offer(root);
		while (i[0]<s.length()) {
			for (int n=q.size(), j=0;j<n;++j) {
				TreeNode c=q.poll();
				if ((c.left=decodeHelper(s,i))!=null)
					q.offer(c.left);
				if ((c.right=decodeHelper(s,i))!=null)
					q.offer(c.right);
			}
		}
		return root;

	}