void 14() - Print all internal nodes of the tree. Output in the file 14.txt must be the following:(line 1: pre-order traversal, line 2: internal nodes (by pre-order traversal))
(W,6,2) (Q,1,4) (Κ,5,2) (L,4,8) (Μ,3,9) (Ν,9,5) (Α,7,-3)
(W,6,2) (Q,1,4) (Κ,5,2) (L,4,8) (Ν,9,5)
void f5() - Suppose p is the 2nd node when performing the pre-order traversal of the tree. Delete the node p by copying. Output in the file f5.txt must be the following:(line 1: pre-order traversal, line 2: pre-order traversal (deleted 2nd)):
(K,7,9) (D,4,3) (H,2,6) (L,1,5) (Q,3,1) (C,6,-4) (6,9,-6) (Μ,8,7)
(K,7,9) (Q,3,1) (Η,2,6) (L,1,5) (C,6,-4) (6,9,-6) (Μ,8,7)
Zoom
+ 150%
Close