Computer Science Student/Professional to help design Courses -- 5
$2-8 USD / hour
Lukket
Slået op over 3 år siden
$2-8 USD / hour
Hi,
I'm looking for a computer science student or professional who can help create and maintain computer science/data science/math-related courses.
As part of your proposal submit a coding solution to this problem:
The array nums contains all numbers from -N to N appearing one time each, except one number that is missing. Write:
int f(int[] nums) so that f returns the number that is missing.
The pay is $3/hour for 20-40 hours a week non-negotiable.
Hi
I am M phill computer science and interested in this work. Please provide more details of the work.
public int f ( int [ ] num )
{
sort ( num ) ; // Any sort algorithm. Quick sort is O (n log n ) even for worst case will be better
for ( int i = -N. ; i <= N ; i ++ )
if ( num [ i ] ! = num [ i ] + 1 )
return num [ i ] + 1 ;
}
// Best case of for loop : If first element is missing O (1)
// Worst case of for loop : if last element is missing O (n)
As per requested, I can mail the solution to you of this problem. I have a computer science engineering background and more than 12 years teaching experience.