private Node decode(Result r, AtomicInteger x, AtomicInteger y) {
        if(r.binaryRep.get(x.get()) == 0) {
            x.getAndIncrement();
            return null;
        }

        Node root = new Node();
        root.data = r.actualData.get(y.getAndIncrement());
        x.getAndIncrement();
        root.left = decode(r, x, y);
        root.right = decode(r, x, y);
        return root;
    }
Date 11/01/2015
 @author Tushar

 Encode and decode binary tree using succinct encoding technique

References - http://www.geeksforgeeks.org/succinct-encoding-of-binary-tree/
https://en.wikipedia.org/wiki/Binary_tree#Succinct_encodings
src/com/interview/tree/SuccinctTree.java