1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-12-21 03:13:45 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2025-09-29 14:43:44 +08:00
parent 2862a227c4
commit 13f2098086
4409 changed files with 168933 additions and 166256 deletions

View File

@@ -44,3 +44,6 @@ productOfNumbers.getProduct(2); // return 32. The product of the last 2 numbers
<li>At most <code>4 * 10<sup>4</sup></code> calls will be made to <code>add</code> and <code>getProduct</code>.</li>
<li>The product of the stream at any point in time will fit in a <strong>32-bit</strong> integer.</li>
</ul>
<p>&nbsp;</p>
<strong>Follow-up: </strong>Can you implement <strong>both</strong> <code>GetProduct</code> and <code>Add</code> to work in <code>O(1)</code> time complexity instead of <code>O(k)</code> time complexity?