public List postorderTraversal(TreeNode root) {
LinkedList ans = new LinkedList<>();
inoder(root,ans);
return ans;
}
public void inoder(TreeNode root,List<Integer> list){
if(root==null)return;
inoder(root.left,list);
inoder(root.right,list);
list.add(root.val);
}