DSA Key Problems

Online Stock Span

Design a structure that receives one stock price at a time and returns the number of consecutive days ending today whose prices are no greater than today's price.