build binary tree from start and end element of an array

I am solving this question, Please guide me.