public Node createTree(int pre[],char val[]){
        PreIndex pi = new PreIndex();
        pi.index = 0;
        return createTree(pre, val,pi);
    }
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