DSC-Banasthali-Vidyapith / Code-Crossroad

This project contains the carefully compiled Data Structures & Algorithm questions asked by the companies that visit Banasthali Vidyapith on-campus.
MIT License
55 stars 78 forks source link

Stock Span Problem #105

Closed Anshika-Srivastava closed 2 years ago

Anshika-Srivastava commented 3 years ago

Question : 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 span of 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 or equal to its price on the given day.

Language: C++

Expected Complexities: Time=O(n) Space=O(n)

Please assign me this. Thank You!

Vanshikagarg17 commented 3 years ago

You can start working on this issue. All the best!