Design and analysis of algorithms
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.
- 10 days ago
- 6
Answer(1)
Purchase the answer to view it
NOT RATED
- DesignAnalysisandAlgorithm.docx
Bids(81)
- Dr Michelle Maya
- Dr. Diana_Ashley
- Amanda Smith
- Dr. Michelle_KM
- Emily Clare
- Creative Geek
- Dr.Michelle_Prof
- Discount Assign
- Tutor Cyrus Ken
- Teacher A+ Work
- Dr shamille Clara
- HomeMarket_Tutor
- Michelle GoodMan
- Discount Ans
- American Tutor
- Michelle Owens
- RihAN_Mendoza
- runge-kutta acer
- Emily Michael
- Cotton Candy
- Catherine Owens
- Noor427726
- ProCastrol01
- HOMWORK_WRITER
- EssaySupremo
- Math Vic
- Jessica Luis
- Ranchoddas Chanchad PhD
- MathStats Acer
- PROF. ANN
- Brilliant Geek
- Eva Green
- Prof.MacQueen
- Urgent Tutor
- Sasha Spencer
- Yourstar
- Stano 001
- writer respect
- WIZARD_KIM
- perfecto
- university work
- ConsultThanos
- Goodwriter
- Rey writer
- Terry Roberts
- Beaverly
- Prof. Johnstar
- Dr_Amal
- brilliant answers
- Proff work phd
- Dr R Judy Mark
- Elprofessori
- Angelina May
- Miss Professor
- DrNicNgao
- Clytemnestra
- Nursing_Miss
- MISS MLUCK
- DexterMasters
- hassan_0102
- Tutor-Cahun
- GradeSaver
- kim woods
- smart-tutor
- Prof Nato(PhD)
- Wendy Lewis
- Essay-Shark-JW25
- Paula Hog
- prof avril
- ansRohan
- PROFJUMAAA
- ChrisProf
- PROF_TOMMY
- Sally Sutton
- Tom Kirk
- Dr_Brilliant
- Gladys.Tutor
- DrSimon
- Jaygoyani
- KahRuruWriting
- Guarantee Pass
other Questions(10)
- The process for screening biased jurors from the jury pool is called
- Sales Mix Decision
- info discussion
- ACC 317 advance federal taxation
- EIP Assignment4
- Consider the following questions concerning sedentary and physically active persons. Answer each question in 75 to 125 words each in the space provided.
- Jack owns an auto repair shop, specializing in European cars
- The weights of certain machine components are normally distributed with
- Load the Meat20 file and regress Chicken Sales (ChicCon) as a function
- HRM 595 Final Exam
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: …
9 days ago
Tips(0)
Udemy(0)