public static TreeNode desrializeTree()
    {
        TreeNode rootNode = null;

        try
        {
            BufferedReader br = new BufferedReader(new FileReader("D:\\Dev\\Java\\tree.txt"));
            String treeString = br.readLine();
            treeString = treeString.trim();
            String[] tokens = treeString.split(" ");

            if(tokens.length == 0)
                return rootNode;

            Queue<TreeNode> nodes = new LinkedList<TreeNode>();

            int index = 0;
            rootNode = new TreeNode(tokens[index]);
            nodes.add(rootNode);
            TreeNode left, right = null;

            while(!nodes.isEmpty())
            {
                TreeNode curNode = nodes.remove();
                if(curNode != null)
                {
                    left = tokens[index+1].equals("#") ? null : new TreeNode(tokens[index+1]);
                    right = tokens[index+2].equals("#") ? null : new TreeNode(tokens[index+2]);

                    if(left != null)
                    {
                        curNode.setLeft(left);
                        nodes.add(left);
                    }
                    if(right != null)
                    {
                        curNode.setRight(right);
                        nodes.add(right);
                    }

                    index += 2;
                }
            }
        }
        catch (IOException e )
        {
            e.printStackTrace();
        }

        return rootNode;
    }