Create the fastest sorting array code in C:
1: We have a C array define as bellow:
double* CreateDoubleArray(int size)
{
double* pDoubleArray = malloc( sizeof( double )*size );
return pDoubleArray;
}
"""
2: A = CreateDoubleArray(N)
3: for i in N:
A[i] = a double
some values of A could be empty ex: A[28] = empty
4: create a c function to sort A according to the float value.
Ex:
A = A[1]= 1.02
A[2]= 3.656
A[6]= 0.56
A[8]= 0.01
A[9]= 5.36
A[10]= 62.36
here A[3,4,5,7] are not defined it is normal, should work like this. Could associate a specific value to those cases, ex: -1000.
At the end I need to recover a new integer array B of the sorted (descending or ascending inlclude an input to decide) positions: Ex: B=[10,9,2,1,6,8] here. Please pass B as an input of the function return nothing but fill properly B.
So function should be: getposition(A(array to order),B (array of positions),1 or -1(ascending or descending))
Should be very fast with array of 5000 numbers.
Thanks,
Yannick
Good day,
I've complete Phd Software Engineering. I've 5-Year experience in C development and algorithm implementation.
My Core Expertise in Java - C++ - C - object-oriented - Data Structure - Swing - OpenGL - JavaFX.
I have got your project requirement enough, Please leave a message on my chat so we can discuss the project.
I can complete your project on time and you will satisfy if you hire me
Best Regards:
Aqeel Ahmed
Hi, there.
I have read your job description carefully and I think I can help you.
As an expert of C/C++, I can complete your project perfectly.
Please have a look at my profile reviews.
Hope for your reply.
Thanks.