private int getParent(int index){
        return index - (index & -index);
    }
To get parent
1) 2's complement to get minus of index
2) AND this with index
3) Subtract that from index
src/com/interview/tree/FenwickTree.java