most frequent elemnt in an interval using segment tree