Find Jobs
Hire Freelancers

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

₹600-1500 INR

Geschlossen
Veröffentlicht vor mehr als 5 Jahren

₹600-1500 INR

Bezahlt bei Lieferung
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. 1 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 Tree. • All requests are to be handled with respect to the most recent set built.
Projekt-ID: 18040888

Über das Projekt

5 Vorschläge
Remote Projekt
Aktiv vor 5 Jahren

Möchten Sie etwas Geld verdienen?

Vorteile einer Ausschreibung auf Freelancer

Legen Sie Ihr Budget und Ihren Zeitrahmen fest
Für Ihre Arbeit bezahlt werden
Skizzieren Sie Ihren Vorschlag
Sie können sich kostenlos anmelden und auf Aufträge bieten
5 Freelancer bieten im Durchschnitt ₹2.138 INR für diesen Auftrag
Avatar des Nutzers
Hi, I am experienced programmer and I can help you to solve this task. Please contact me if you are interested in cooperation.
₹2.300 INR in 3 Tagen
5,0 (98 Bewertungen)
6,5
6,5
Avatar des Nutzers
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
₹3.888 INR in 3 Tagen
4,7 (8 Bewertungen)
2,5
2,5
Avatar des Nutzers
I have a vast experience in C projects and problems. I can assist you in this project. You won't be disappointed hiring me!
₹2.250 INR in 3 Tagen
0,0 (0 Bewertungen)
0,0
0,0

Über den Kunden

Flagge von INDIA
Hyderabad, India
0,0
0
Mitglied seit Okt. 15, 2018

Kundenüberprüfung

Danke! Wir haben Ihnen per E-Mail einen Link geschickt, über den Sie Ihr kostenloses Guthaben anfordern können.
Beim Senden Ihrer E-Mail ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.
Registrierte Benutzer Veröffentlichte Jobs
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Vorschau wird geladen
Erlaubnis zur Geolokalisierung erteilt.
Ihre Anmeldesitzung ist abgelaufen und Sie wurden abgemeldet. Bitte melden Sie sich erneut an.