markandey007 / DSA_CODES

follow must before pr then i will check and merge ur pr
14 stars 84 forks source link

Create The Stock Span Problem #5

Closed Austin2501 closed 1 year ago

Austin2501 commented 2 years ago

The stock span problem is a financial problem where we have a series of n daily price quotes for a stock and we need to calculate the span of the stock’s price for all n days. The span Si of the stock’s price on a given day i is defined as the maximum number of consecutive days just before the given day, for which the price of the stock on the current day is less than its price on the given day.