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 #115

Closed pratisth2 closed 2 years ago

pratisth2 commented 2 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++ I will optimize time and space complexity in 0(N). Please assign this issue to me . Thank you.

Vanshikagarg17 commented 2 years ago

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