Construct a tree from postOrder and inOrder

GFG Solution

I had tried the same concept to solve but only difference is that they use Pindex variable in wrapper class name (Index) and I am using Pindex as (int) in buildUtil function. How they differ ?.

class Index { int index; }