There is an array with a random number of elements (even / odd). Suppose 50 < размер массива < 100 .
How to derive all the elements of an array by one according to the principle of "damped pendulum", namely: if 85, then:
1, 85, 2, 84, 3, 83... And so to the last in the middle. It is required to calculate the difference between 1 and 85 , 2 and 84 , etc. to bind to the stream delay (no stream is needed). In the absence of a pair of the last element does not take into account the difference.
0toдлина - 1, or are they random? - Regent50, 100, 49, 99, 48, 98does not resemble a damped pendulum, because there are always exactly 49 elements between the elements. Either it should be1, 100, 2, 99, 3, 98, or you picked up the wrong comparison. - Regent