Given an array of integers, update the index with multiplication of previous and next integers,
Input: 2 , 3, 4, 5, 6
Output: 2*3, 2*4, 3*5, 4*6, 5*6
Please suggest an approach that gives output with maximum performance:
void array (int A,int Aux, int n)
Aux=A*A; /* First and last index calculation are exception
so, it can be manually done.*/
A is given array of integers and Aux is auxiliary array for storing final result and n is the length of array . And complexity of this solution is O(N).
For creating automatas you can also ...