human
Find postorder traversal of BST from preorder traversal | Run loop from 1 to length of pre.
Prfrom pivot length - 1 to zero.
Prfrom end to pivot length.
Driver Code"
Solution in Python:
 Write me a code to find postorder traversal of BST from preorder traversal and the other steps required?
assistant
#Here is code to find postorder traversal of BST from preorder traversal and the other steps required.
 def getPostOrderBST ( pre , N ) :
	pivotPoint = 0
	for i in range ( 1 , N ) :
		if ( pre [ 0 ] <= pre [ i ] ) :
			pivotPoint = i
			break
	for i in range ( pivotPoint - 1 , 0 , - 1 ) :
		print ( pre [ i ] , end = " ▁ " )
	for i in range ( N - 1 , pivotPoint - 1 , - 1 ) :
		print ( pre [ i ] , end = " ▁ " )
	print ( pre [ 0 ] )