shabaNAMINATA6 shabaNAMINATA6
  • 06-11-2020
  • Business
contestada

Create your own buy and sell stock problem

Respuesta :

brachac77
brachac77 brachac77
  • 06-11-2020

Answer:

The cost of a stock on each day is given in an array, find the max profit that you can make by buying and selling in those days. For example, if the given array is {100, 180, 260, 310, 40, 535, 695}, the maximum profit can earned by buying on day 0, selling on day 3. Again buy on day 4 and sell on day 6. If the given array of prices is sorted in decreasing order, then profit cannot be earned at all.

Explanation:

Answer Link

Otras preguntas

give six sentences of using assonance​
what was a purpose of zoning laws
What is the solution to the equation below?log 20х3 - 2logx = 4 x=25x=50x=250x=500​
Describe the steps you used to solve the equation and find the amount of Carrie’s allowance. Linear equation:  1 4 a + 1 3 a + 8 = 22
Which inequality has no solution? 6(x+2) > x-3 3+4x<2(1+2x) 0 -2(x+6) CX-20 OX-9<3(x-3)
Evaluate 1/ 2^-2x^-3y^5 for x=2 and y=-4
What is the missing reason for the 3rd step in the proof below?
Look at the image, read, and choose the correct pronoun to complete the sentence. Two bald men Somos los hermanos Frank y Matt y ________ somos calvos. nosotro
If abc is reflected across the y-axis,what are the coordinates of c?
Ford conducted research that gave them insights into characteristics of Gen Z. Although Ford finds the information important, they aren't currently developing a