Algorithm -7
You are asked to design an algorithm to optimize profit on a stock X. The following is how the stock has been doing for the last 10 days:
Day 1: $143;
Day 2: $122;
Day 3: $121;
Day 4: $119;
Day 5: $147;
Day 6: $170;
Day 7: $172;
Day 8: $180;
Day 9: $170;
Day 10: $161.
Your algorithm should:
a) find the lowest price to buy and the highest price to sell.
b) make the buying date before the selling date
Hint: To make the algorithm more effective you may create two arrays or lists instead of one.
5 years ago
7
Answer(1)![blurred-text]()
![]()
Purchase the answer to view it

- Algorithm-7Mins86.docx
other Questions(10)
- denniswrightM2A1
- In section 1, Bierce includes few details in An occurence at Owl Creek Bridge about the condemned man and does...
- LastminResearchneededMental
- Multiple Questions Answers
- GRAPHIC ARTIST ONLY
- Project
- powerpoint Projects
- Nursing Profession/Kelly Jacobs
- Seaport BUS C110 Midterm Exam 46999
- A project has the following estimated data - price = $65 per unit; variable costs = $33