Write me a c code based on data structures mentioned in description.

Problem Statement

• Input: A set S = {a1, a2, . . . , an} of natural numbers given as a se-

quence. Additionally, several requests to perform operations on S.

• Goal: Store the elements of S in a Red-black tree and serve the follow-

ing requests:

1. Add an input number x into set S. (i.e., S ← S ∪ {x})

2. Find successor of a given number x in S.

3. Delete a given number x from S. (i.e., S ← S \ {x})

4. Search for a given number x in S.

5. Print the set.

Input Format

Each line of the input starts with one of six symbols:

• ‘N’ (stands for new set)

• ‘+’ (Add element to set)

• ‘>’ (Find successor)

• ‘–’ (Delete element)

• ‘S’ (search within most recent set)

• ‘P’ (pre-order traversal)

The input format specification for all of the above are exactly like in assign-

ments 2B and 3.


Output Format

• For input lines starting with ‘N’, ‘P’, ‘+’, ‘–’, ‘>’ the output format is

exactly as per specification in assignments 2B and 3.

• If input line was “S t”:

– Output “-1” if t is not found in the set formed by the numbers in

the most recent line that started with “N”.

– Else, output a bit string that represents the path from root to

the node N containing t followed by a space and the color of N.

Represented black with ‘B’ and red with ‘R’. End the line with a

\n character.

Implementation rules

• The data structure used to implement the set should be a Red-black


• All requests are to be handled with respect to the most recent set built.

Skills: Algorithm, C Programming, C# Programming, C++ Programming, Software Architecture

See more: write code transfer data sql server excel, write simple text based game code, projects based data structures, binary tree, geeksforgeeks, data structure tutorial, graph data structure, tree data structure, data structure notes, data structure used in social networking sites, types of data structures, morse code data structures tree, write data structures file, battleship game write data structures codes, job description web based data entry, write macro code export data excel txt file, code tree based data mining algorithm java, simple project data structures code, data structures project source code, write search query using data structures java

About the Employer:
( 0 reviews ) Hyderabad, India

Project ID: #18040888

6 freelancers are bidding on average ₹1948 for this job


Hi, I am experienced programmer and I can help you to solve this task. Please contact me if you are interested in cooperation.

₹2300 INR in 3 days
(95 Reviews)

A professional having 5 years of experience in embedded software development. Excellent programming skills in C/C++ and Linux. Strong programming skills in data structures linked list, stack, graph, queue etc

₹3888 INR in 3 days
(8 Reviews)
₹1000 INR in 1 day
(1 Review)
₹1250 INR in 1 day
(0 Reviews)
₹1000 INR in 6 days
(0 Reviews)

I have a vast experience in C projects and problems. I can assist you in this project. You won't be disappointed hiring me!

₹2250 INR in 3 days
(0 Reviews)