public Result encode(Node root) {
        Result r = new Result();
        encode(root, r);
        return r;
    }
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