Exercise: Buy and Sell Stock
Challenge yourself with an exercise in which you'll have to find the maximum profit generated by buying and selling stocks!
We'll cover the following...
Problem
Given an array of numbers consisting of daily stock prices, calculate the maximum amount of profit that can be made from buying on one day and selling on another.
In an ...