binarsady indexed tree DS for 1D and 2
updated 2D part
new problems