Approach to this challenge

Sir how do i approach this question?

hi @Ekram
you can approach the question in the following manner
Pick an element from PostOrder from Last. Decrement a PostOrder Index Variable (preIndex in below code) to pick next element in next recursive call.
2) Create a new tree node tNode with the data as picked element.
3) Find the picked element’s index in Inorder. Let the index be j.
4) Call buildTree for elements before j and make the built tree as left subtree of tNode.
5) Call buildTree for elements after j and make the built tree as right subtree of tNode.
6) return tNode.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.