Find Jobs
Hire Freelancers

Write a Skip List in C

$10-30 USD

Dokončeno
Zveřejněno před více než 7 roky

$10-30 USD

Zaplaceno při doručení
Create an implementation of a skip list in C that allows for non-unique (meaning you can have multiple of the same number) non-negative integer keys. Your tree will only store keys, no associated data. Implement all 7 dictionary operations: - Insert a given key, return key value, -1 if unsuccessful (run out of space). - Delete a key (all nodes with the given key), return number of nodes deleted. - Search for a key, return 1 if found, 0 otherwise. - Min, Max: Return the minimum/maximum key in the tree. - Successor/Predecessor: Given a key that exists in the tree, return the next bigger/smaller key in the tree. Return -1 if the given element is the biggest/smallest in the tree, or if the given key cannot be found in the tree. - Height: the height of an empty tree will be -1. Due to the multiple ways you can handle non-unique keys, your height may vary. Your program should be able to parse input provided in the standard input, each line of which performs one dictionary operation. Each line has one directive and potentially one key (dependent on the operation), separated by a single space character. You can assume that the input has no errors. The directives are: INS: Insertion DEL: Deletion SEA: Search MIN: Minimum MAX: Maximum PRE: Predecessor SUC: Successor HEI: Tree height Example input file: INS 45 INS 31 INS 45 DEL 10 SEA 31 SEA 11 DEL 45 MIN SUC 80 INS 1 SUC 1 HEI Which should produce the following output: 45 31 45 0 1 0 2 31 -1 1 31 1 To test your program, I will run my script that it'll have to pass the 2 tests. If all of the above are implemented correctly, the script will work perfectly fine with your project/software. Your program can consist of multiple files, and should be accompanied by a makefile. When compiled with the command ‘make’, an executable called sl should be created. That executable will parse input from its standard input and produce all output in its standard output. No other output except the required output mentioned above should be sent to the standard output.
IČ projektu: 12251689

O projektu

18 nabídky
Vzdálený projekt
Aktivní před 7 roky

Chcete si vydělat nějaké peníze?

Výhody podávání nabídek na Freelancer

Stanovte si rozpočet a časový rámec
Získejte za svou práci zaplaceno
Načrtněte svůj návrh
Registrace a podávání nabídek je zdarma
Uděleno:
Avatar uživatele
Hello! I am highly trained in C and very proficient in algorithms in data structures. If you need a perfectionist programmer to solve your problem, feel free to contact me for further details.
$20 USD v 1 dni
5,0 (2 recenze)
1,8
1,8
18 freelanceři nabízejí v průměru $34 USD za tuto práci
Avatar uživatele
Hello, I am expert in c and c++ since more than 20 years ago ... you can see my previous jobs... is it a balanced tree? AVL? ... Best regards!
$72 USD v 3 dnech
5,0 (87 recenze)
7,1
7,1
Avatar uživatele
I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 6 years. My work is online game developing, and mainly focus on server side, using c++ under linux environment. I used c++ to make many great projects, for example, I made the tools which can convert java files into c++ scripts, of course garbage collection included, this job is very similar to a compiler, and is very complex. I also made our own mobile game using c++, I can show you the demo of client, if you like. I am very proficient in java also. I have a very good review on Freelancer.com, I never miss a project once I accept the job, you can check my review. Trust me, please let expert help you.
$100 USD v 1 dni
4,9 (133 recenze)
6,9
6,9
Avatar uživatele
Hello. More 20 years programming experience. I need more details to set real time and price. Regards. -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
$25 USD v 3 dnech
4,8 (12 recenze)
4,5
4,5
Avatar uživatele
Hi. I can help you with this.
$30 USD v 5 dnech
5,0 (18 recenze)
3,9
3,9
Avatar uživatele
Hi, I can do your project. You can see my profile for reviews and ratings for c programming. Ping me to get started
$30 USD v 2 dnech
5,0 (6 recenze)
3,4
3,4
Avatar uživatele
Hi I have done lots of projects like this as evident based on my happy employers feedback in my profile. I have done Masters in CS and surely deliver as per your expecations.. Hope to work with you.. regards Arch
$23 USD v 2 dnech
4,9 (15 recenze)
3,5
3,5
Avatar uživatele
hey I am c/cpp programmer and has sound knowledge and experience with data structures. I can implement this for you in a short period of time. let me know. you are interested. thanks
$35 USD v 2 dnech
5,0 (2 recenze)
1,1
1,1
Avatar uživatele
I've developed algorithms of more complexity.
$35 USD v 4 dnech
0,0 (0 recenze)
0,0
0,0
Avatar uživatele
A proposal has not yet been provided
$30 USD v 3 dnech
0,0 (0 recenze)
0,0
0,0
Avatar uživatele
Hello, I have a rich experience in C and good knowledge of data structures. Bid is low, because its actually my very first on this site. Thanks, Teodor.
$20 USD v 1 dni
0,0 (0 recenze)
0,0
0,0

O klientovi

Pochází z UNITED STATES
Keansburg, United States
5,0
3
Ověřená platební metoda
Členem od říj 2, 2014

Ověření klienta

Díky! Poslali jsme vám e-mailem odkaz pro získání kreditu zdarma.
Při odesílání e-mailu se něco pokazilo. Zkuste to prosím znovu.
Registrovaných uživatelů Zveřejněných projektů
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Načítání náhledu
Bylo uděleno povolení ke geolokaci.
Vaše doba přihlášení vypršela a byli jste odhlášeni. Přihlaste se znovu.