In_preorder_traversal

my tree is not building

You have to use 4 variable for two arrays
You have make only 3 you don’t have in order’end
As pre-order start and end are moving similarly inorder start and end move so it is necessary to make 4 variable