</>OfferRetriever
DashboardDiscuss
NEW

Halloween Sale

Unlock all premium questions for over 30% off

$10.42$7.08/mo

--

:

--

:

--

:

--

Get this deal
Back to Microsoft Questions

Build the Longest Spike Sequence

Medium

Question

We use the word spike for a run of numbers that keeps climbing (each value bigger than the one before) and afterwards keeps dropping (each value smaller than the one before). The peak, the largest value, is shared by the rising part and the falling part. So [3, 8, 9, 4, 1] is a spike, while [2, 4, 4, 9, 1] is not, since its rising part repeats the value 4 and therefore does not go strictly up. ...

Asked at:Microsoft

More Microsoft interview questions

All Microsoft interview questions
OfferRetriever

Master technical interviews with real questions from top companies. Build your confidence and career.

PRODUCT
PricingDashboardDiscussOfferRetriever vs LeetCodeCompare
LEGAL

© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.