C ++ program to print Postorder traversal from given Inorder and Preorder traversals .
#include <iostream> NEW_LINE using namespace std ; int preIndex = 0 ; int search ( int arr [ ] , int startIn , int endIn , int data ) { int i = 0 ; for ( i = startIn ; i < endIn ; i ++ ) { if ( arr [ i ] == data ) { return i ; } } return i ; } void printPost ( int arr [ ] , int pre [ ] , int inStrt , int inEnd ) { if ( inStrt > inEnd ) { return ; }