tree traversal: If c is children of a, should i list first c then a when getting in inorder traversal

120 Views Asked by At

Tree

I am trying to list preorder, inorder and postorder traversal of the tree above using flags but I am not sure with my answer particularly on inorder. I am confused if I shall list first the children then its parent or parent then children e.g c and a

Can you also check if my answer is right?

preorder = a,b,e,j,k,f,g,l,m,c,d,h,n,i,o,q,r,s,p
inorder = j,e,k,f,b,l,g,m,c,a,n,h,d,q,r,o,s,i,p
postorder = j,k,e,f,l,m,g,b,c,n,h,q,r,s,o,p,i,d,a