What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-13 12:42:03
mirror a binary tree
//mirror a binary tree void mirror(Node root){ Queue<Node> q=new LinkedList<>(); q.add(root); while(!q.isEmpty()){ Node currnode=q.poll(); Node temp=currnode.left; currnode.left=currnode.right; currnode.right=temp; if(currnode.left!=null){ q... Add solution