Find Jobs
Hire Freelancers

Implement algorithm in C

$10-30 USD

Completed
Posted over 7 years ago

$10-30 USD

Paid on delivery
You need to implement following two functions in C language: void preserveTopNValues(double* data, size_t size, size_t n); void fastPreserveTopNValues(double* data, size_t size, size_t n); Detailed explanation: Array "data" contains "size" values which may go in any order (i.e. can be both sorted or unsorted) and may have duplicates. Both functions must find top "n" unique absolute values in the "data" and preserve them, and set other elements of array to zero. Function "preserveTopNValues" must complete the abovementioned task with minimum additional memory usage, while may do it slower. Function "fastrPreserveTopNValues" must complete the abovementioned task with maximum speed, while may use more additional memory. Other requirements: 1. Functions must be implemented in plain C (not C++ !!!) 2. Code must conform to C99 standard. 3. Code must be formatted according to Linux astyle and well commented. 4. Code must use "camel case" naming of variables and functions. 5. Code must be compilable without errors on Linux with GCC 4.8.2+ with following compiler options set: -Wall -Wextra -Werror -std=c99 6. Function can use only standard C library, usage of any 3rd party libraries is strictly not allowed. Deliverables: 1. Source code of functions. 2. Sample program (also delivered as source code) that: - dispays input data - calls functions - dispays output data - proves that output matches to expected result - proves that both functions give the same output on the same inputs. 3. GNU Make compatible Makefile to build the sample program. 4. Small plain text file called [login to view URL] that shortly explains both algorithms and why they were chosen for the particular variant of implementation (normal/fast).
Project ID: 11788748

About the project

9 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
........................................................................................................
$30 USD in 3 days
4.7 (6 reviews)
2.7
2.7
9 freelancers are bidding on average $32 USD for this job
User Avatar
hi there I would like to do this project if given the opportunity. let me know if you are interested so I can have further details. thanks.
$30 USD in 1 day
4.9 (509 reviews)
7.0
7.0
User Avatar
$60 USD in 1 day
4.9 (318 reviews)
7.1
7.1
User Avatar
We are team of excellent developers and writers. We have 2 year experience related to your project field. We can do your project and solve your all problems according to your requirements. We have read your description for projects and we understand what you want so we are confident that we can do it easily in mention time. We assure you that you will be completely satisfy with our work. And after delivering your project if you feel some issue in understanding the projects then we will teach you free until you understand. If you have any question then feel free to ask. We are here for you. Thank you
$20 USD in 1 day
4.8 (20 reviews)
4.1
4.1
User Avatar
I’d like to be considered for your Implement algorithm in C Project. I'm software engineer with more then 3 years experience in Development & Designing. I'm expert in C, C++, C#, Java, Python, Ruby, Software Development & Designing, Scrapping, Database Development, .NET Development, Scripting, System Programming, Web Development( Full Stack Development, Mean Stack Development, PHP and its Framework, Web API, CMS ) and Data Entry Work I have more many experiences in all these skills. I am pretty flexible with respect to working hours. Deadlines are sacred for me and I will review your content as many times as it takes for it to exceed your expectations! It's important to me to build long term relationships with clients, so I'm primarily looking for long term projects. I'm flexible with my working hours and I'm happy to work closely with any existing freelancers you work with. I will never ever let you down! I look forward to hearing from you....
$25 USD in 0 day
5.0 (2 reviews)
1.3
1.3
User Avatar
Hi, Thank you very much for posting this project i like to complete your project in a smooth fashion, i like you to check my ability either by directly giving the project or first check my profile an decide. Thank you for your consideration.
$25 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
My name is Anson, I am a programmer of around 10 years now from the United States, educated at the University of California. My bid is slightly on the higher side, but if you are willing to pay the extra, I promise the quality will match.
$50 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
Hello This is a example code, I can to make a better code #include <stdio.h> void preserveTopNValues(double* data, size_t size, size_t n) { int i; for(i = 0; i < n, ++i) { if(i > size ) { data[i] = 0; } } }
$25 USD in 10 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UKRAINE
KHARKIV, Ukraine
5.0
5
Payment method verified
Member since Sep 10, 2015

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.