public static void main(String args[]){
        BinaryTree bt = new BinaryTree();
        Node root = null;
        root = bt.addNode(10, root);
        root = bt.addNode(0, root);
        root = bt.addNode(-5, root);
        root = bt.addNode(5, root);
        root = bt.addNode(7, root);
        root = bt.addNode(3, root);
        root = bt.addNode(30, root);
        root = bt.addNode(40, root);
        root = bt.addNode(25, root);
        root = bt.addNode(46, root);
        root = bt.addNode(-8, root);
        root = bt.addNode(-2, root);
        root = bt.addNode(-1, root);
        root = bt.addNode(28, root);
        VertexCoverBinaryTreeDP vc = new VertexCoverBinaryTreeDP();
        System.out.println(vc.cover(root));
    }
http://www.geeksforgeeks.org/vertex-cover-problem-set-2-dynamic-programming-solution-tree/
http://en.wikipedia.org/wiki/Vertex_cover
Using lis to store the cover data
Test cases:
null root
Only left child
Only right child
Tree with only one child at every node
src/com/interview/tree/VertexCoverBinaryTreeDP.java