Question: Please Create 3 seperate Files for the C++ Program. See instruction Below. Red-Black Tree Insertion - To receive a full credit, you should apply the
Please Create 3 seperate Files for the C++ Program. See instruction Below.

Red-Black Tree Insertion - To receive a full credit, you should apply the software engineering best practices by splitting the program into three files: header file, implementation file and main driver file. Write a program to insert a set of integers into an empty Red-Black tree by apply the Red-Black tree insertion algorithm that we have learned in class (see pdf lecture file). The program should display the final tree on the screen. Given integers: 9, 18, 7, 14, 17, 45, 26, 35, 50, 2, 1, 60 (you can terminate the input with a negative integer i.e. -1 or -9) Notes: You should test your program using different data sets to be sure it works correctly. Sample Output A balanced red-black tree after insertion Inserting nodes into an empty Red Black Tree. 9 18 7 14 17 45 26 35 50 2 1 60 17 Final balanced red-black tree: 26 ROOT - - - -17(BLACK) ----9(BLACK) 14 18 L----2(BLACK) L----1(RED) R- ---7(RED) R- - --14(BLACK) 35 50 R- -26 (BLACK) --18(BLACK) 60 R- - --45(RED L----35(BLACK) R-- --50(BLACK) R----60(RED)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
