Only one testcase passed

correct left and right calls

root->left = build(pre,in,s,index-1);
root->right = build(pre,in,index+1,e);

Modified Code