Find the lowest price to buy and the highest price to sell

Assignment Help Other Subject
Reference no: EM132804110

Assignment: 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.

Reference no: EM132804110

Questions Cloud

Difference between the two methods of planning : What is the difference between the two methods of planning? Do you believe strategic and operation planning should overlap just like leadership and management.
What is the maximum CCA deduction DRG Marketing : What is the maximum CCA deduction DRG Marketing can have for the Class 8 assets during 2020? Dispositions, proceeds: $8,000 (original cost: $19,000).
Demonstrate a connection to your current work environment : Demonstrate a connection to your current work environment. If you are not employed, demonstrate a connection to your desired work environment.
Find What is the UCC balance at the end of the year : Beginning UCC balance: $56,000. What is the UCC balance at the end of the year, assuming the maximum CCA deduction was taken in the year?
Find the lowest price to buy and the highest price to sell : 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.
What role does formal institutions play : From an institutional perspective, what role does formal institutions play in the future of organisations in the energy sector?
Course-business management : Hi there i need help with my Assignment in identifying from the below 4 readings which readings use Deontology, Teleology or Virtue Ethics or a combination to j
Explain the windows os using the gui : Using the Command Line Interface (CLI), use three different commands. For example, move, copy, remove. Take a screenshots and add them to a Word document.
Provide the company production budget for each quarter : Provide the company's production budget for each quarter of this year. How much cash does Henderson expect to receive from sales in Q3?

Reviews

Write a Review

Other Subject Questions & Answers

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd