← Microsoft questions

The Stock Span Problem

Filed under Microsoft · Also reported at Accolite, Disney+ Hotstar, Infinera, LinkedIn

Given an array of daily stock prices, calculate the span of the stock price for each day. The span of a stock price on a given day is the maximum number of consecutive days (up to and including today)…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Microsoft questions

Collected from public candidate posts and coding forums. Updated Nov 2026.