Search
⌘K
Get Premium
Leetcode 2034. Stock Price Fluctuation
Design a data structure that maintains timestamp→price records which may arrive out-of-order and be corrected later, supporting efficient update(timestamp, price) and queries for the current price (price at the latest timestamp) as well as the global maximum and minimum prices. The key challenge is handling corrections and duplicates while keeping current/max/min queries fast.
Asked at:
Snapchat
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early December, 2025
Snapchat
Mid-level
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.