Build tree from inorder and postorder

i wanted to know what will be the time complexity of the code which is explaines in this video…i think it is o(n^2)…
if it is o(n) then please explain why!

Yes it is O(n^2).
You can check the optimized approach from here https://www.geeksforgeeks.org/construct-a-binary-tree-from-postorder-and-inorder/

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.

this code is giving segmentation fault while submitting at gfg