added 2^h tree implementation in matlab/java