public static int maxDepth(TreeNode root) {
		if (root == null)
			return 0;
		Queue<TreeNode> currentLevel = new LinkedList<TreeNode>();
		currentLevel.add(root);
		int count = 0;
		while (!currentLevel.isEmpty()) {
			Queue<TreeNode> nextLevel = new LinkedList<TreeNode>();
			while (!currentLevel.isEmpty()) {
				TreeNode cur = currentLevel.poll();
				if (cur.left != null)
					nextLevel.add(cur.left);
				if (cur.right != null)
					nextLevel.add(cur.right);
			}
			currentLevel = nextLevel;
			count++;
		}
		return count;
	}