Write a function using C++ statements called MeanProduction () which takes three integer arrays
(array1, array2, array3) and an integer as the size of the arrays as parameters. The array1 holds Outlet
1 production and array2 holds Outlet 2 production. The function calculates the average of each
product using the findMean (value1, value2) function and stored in the array 3.
Example
Consider the sample values of array1 and array2
array1 (Outlet 1)
array2 (Outlet 2).
Array index
Product Quantity
Array index Product Quantity
O
30
O
20
25
20
2
30
2
50
3
46
3
40
After calling the function MeanProduction (), array3 contains the average of each day.
Array index
O
1
2
3
array3
Average Quantity
25
22.5
40
43
Write a PYTHON function to get the input from the user to go with words given on the fly (input through keyboard) or read it from a file. At least it should contain a single word otherwise throw an error to the user rather than showing a PYTHON error.
Shuffle letters of words evenly and oddly except the first and last character when we run it again and again. You need to store the modified one so everytime you run it changes. Keep the odd one in one color and even in another color and keep black for the first and last character
Adcricnog to reacersh at an Engslih Urvtisniey, it deosn't mttear in waht oedrr the ltreets in a wrod are, the olny itopmanrt tih
Solve the recurrence using change of variable method: T(n) = 2T(n/2)+nlogn
Find out the step count for the following function using tabular method.
void ABC( int n ){
for( int i=1; i<= n; i++){
for (int j=1; j<=2^n;j=j*2) {
printf(“%d”,j);
}
}
}
void Example2 (int n){
int a = 0;
for (int i = 0; i < N; i++) {
for (int j = N; j > i; j--) {
a = a + i + j;
}
}
}
Prove weather following statements are true or false.
Represent the following function in form of big-oh(O) and omega(Ω) and theta(Ө) notation. Find the required constants for it.
4n2+7n+3n 3.5
Arrange the following growth functions in increasing order of growth:
O(n1.5), O(2n), O (nlogn), O(logn), O(n3), O() ,O(),O()
Prove that max( f(n), g(n) ) = Ө ( f(n) + g(n) )
Write algorithm to find maximum element from array and find its best and worst case time complexity.
Write bubble sort algorithm and analysis it for best case and worst case time complexity using tabular method. Represent the time complexity using Theta(Ө) notation.