Question
It is a cold winter day in the year 1860. Your parents want you to be a medical doctor but you don't want to go
It is a cold winter day in the year 1860. Your parents want you to be a medical doctor but you don't want to go to college. You want to make your life by trading. So, you need to prove to your parents that you have all the skill sets for trading and if you convince them they will let you drop out of college.So, your plan isinvesting in a property. The price of the property changes every day in an unpredictable way, but somehow, you got the exact property price for the next 50 days. Your purpose is buying it when it is cheap and selling it when it is expensive so that you make a profit. You are only allowed to buy once and sell once during these 50 days. You cannot sell your property before you buy it. You want to maximize your profit. There aren't computers invented in 1860 yet. That means that you cannot write code to compute the maximum profit. Your only choice is comparing the prices of all pairs of days and selecting the days that lead to maximum profit. Exactly, how manypairs are there so that you can determine the maximum profit to prove that you can survive without a college degree?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started