Find Jobs
Hire Freelancers

Write some Software

$10-30 USD

Completed
Posted over 7 years ago

$10-30 USD

Paid on delivery
Looking for someone to program a Binary Search Tree for me in C that allows for non-unique non-negative integer keys (going against a tradition BST, it can include the same number multiple times). It must include the following functionalities: - 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. 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 I would like this done within 6 hours. This shouldn't take long if you know what you're doing. In your message to me, please type: "this won't take me long" or you will not be considered for the job.
Project ID: 11886021

About the project

3 proposals
Remote project
Active 7 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
"this won't take me long" Hello, this will be extremely easy for me, reason being that I have already done something "very" similar, through the AVL binary search tree, available online at [login to view URL] Please just let me know and this will take 2 hours at most.
$30 USD in 0 day
5.0 (8 reviews)
4.0
4.0
3 freelancers are bidding on average $73 USD for this job
User Avatar
A proposal has not yet been provided
$100 USD in 1 day
5.0 (21 reviews)
5.4
5.4
User Avatar
this won't take me long.....................................................................................................................................................................
$88 USD in 1 day
5.0 (5 reviews)
2.7
2.7

About the client

Flag of UNITED STATES
Marlton, United States
5.0
3
Payment method verified
Member since Oct 2, 2014

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.