public static void main(String args[]){
        int pre[] = {10,20,30,40,50,60,70,80,90};
        char val[] = {'N','N','N','L','L','L','N','L','L'};
        ConstructTreeFromPreOrderTraversalWith0or2Child tfp = new ConstructTreeFromPreOrderTraversalWith0or2Child();
        Node root = tfp.createTree(pre, val);
        TreeTraversals tt = new TreeTraversals();
        tt.preOrder(root);
        System.out.println();
        tt.inOrder(root);
    }
http://www.geeksforgeeks.org/construct-a-special-tree-from-given-preorder-traversal/
Test cases:
Length of pre and val is not same
val contains values other than N or L
src/com/interview/tree/ConstructTreeFromPreOrderTraversalWith0or2Child.java