Help regarding a problem

Hi All, I have the following problem. can you help me in solving this.

Suppose we could access yesterday’s stock prices as an array where: