Available question text
Design a data structure that supports appending integers (including zeros) to a stream and returning the product of the last k numbers; the core challenge is to answer getProduct queries much faster than O(k) by handling zeros and maintaining useful aggregate information for O(1) queries.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1352. Product of the Last K Numbers
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source