Question: 1.Write a divide-and-conquer recursive function (C++ or python) countOdd(int Arr[ ], int first, int last) that counts the number of odd value in an array
1.Write a divide-and-conquer recursive function (C++ or python) countOdd(int Arr[ ], int first, int last) that counts the number of odd value in an array of values. First and last are the indices of the first and last elements inside Arr[ ].
2.Using comparison of array elements as basic operation, set up and solve a recurrence relationship to compute the complexity of your code.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
