CS 3050 Programming Assignment # 3. solution

$24.99

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (3 votes)

 In this assignment, you will develop a C program to construct a red and black tree.  For a given input sequence the tree is unique by using RB-INSERT on one number at a time. Below is an example:

 

The input is a sequence of numbers separated by comma, e.g. 1,8,11,2, … The output should be the following to reflect the above tree (i.e., listing nodes from top to bottom, and from left to right, with B and R indicating the black and red colors):

 

11-B; 2-R; 14-B; 1-B; 7-B; 15-R; 5-R; 8-R

 

  • Your program should compile using gcc on a unix/lunix machine. Using a makefile is encouraged but not required. You can also provide a readme file if needed.

 

  • Although not encouraged, you may use g++ for a C++ code. Provide a readme file if you use C++ to explain how to compile and run the program. No other programming language will be accepted.