Tree using Pre and Inorder traversal

My code prints an extra 0 at the end. Please check where is it going wrong.

hello @anindya-gupta

check now->

added this condition to stop furthur recursion.
if(start==end){
return temp;
}