Feature #4: Milestone Reached
We'll cover the following...
Description
Our company wants to display high achieving brokers in a hall of fame. They want to find out if a broker reached a milestone of making k trades and, if so, they want to know when they reached that milestone. Stockbrokers have been making trades and recording their tally of completed trades since the start of their career at the company. The data is being recorded into separate log files, each of which can be viewed as a matrix with 5
columns, one for each day of the week. There are r
rows, representing the last r
weeks of the year. We want to find out when a given broker reached the milestone of k trades in their career.
We’ll be provided with an m x 5
matrix and a target milestone value. Our task is to determine the day and week a stockbroker fulfilled their milestone.
Solution
Each day stores the cumulative sum of all the trades, so ...
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy