1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 -999 I 21 D 1 I 0 D 10 D 11 D 5 D 2 I 10 X -999 3 1 5 -999 D 3 D 1 X -999 -999 D 15 I 30 I 5 I 10 I 20 D 20 D 10 D 5 D 15 D 30 X -999 2 -999 D 2 X -999 12 25 35 12 37 60 80 89 19 32 35 45 55 68 87 95 -999 D 37 D 13 I 40 I 99 X -999 50 40 60 30 70 20 80 10 90 -999 D 30 D 20 D 10 D 50 X -999 30 40 20 10 50 -999 I 30 D 55 D 40 I 50 I 40 D 40 I 15 I 25 D 30 D 15 X -999 14 15 4 9 7 18 3 5 16 4 20 17 9 14 5 -999 X - 999 -666 -666 //Signals end of data file =========================================== ** ALL LINES BELOW -666 flag are ignored ======================================= -999 Terminates the original data D x Deletes integer X from tree I x Inserts integer X from tree -666 Signals end of datafile ========================================== Test data: 14 15 4 9 7 18 3 5 16 4 20 17 9 14 5 -999 7 3 6 73 75 7 956 267 45 73 85 25 72 7 3 72 782 2 412 349 892 -999 Original dataset for backup: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 -999 I 21 D 1 I 0 D 10 D 11 D 5 D 2 I 10 X -999 3 1 5 -999 D 3 D 1 X -999 -999 D 15 I 30 I 5 I 10 I 20 D 20 D 10 D 5 D 15 D 30 X -999 2 -999 D 2 X -999 12 25 35 12 37 60 80 89 19 32 35 45 55 68 87 95 -999 D 37 D 13 I 40 I 99 X -999 50 40 60 30 70 20 80 10 90 -999 D 30 D 20 D 10 D 50 X -999 30 40 20 10 50 -999 I 30 D 55 D 40 I 50 I 40 D 40 I 15 I 25 D 30 D 15 X -999 -666