mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-06 07:51:41 +08:00
存量题库数据更新
This commit is contained in:
@@ -4,12 +4,12 @@
|
||||
|
||||
<ul>
|
||||
<li><code>SummaryRanges()</code> Initializes the object with an empty stream.</li>
|
||||
<li><code>void addNum(int val)</code> Adds the integer <code>val</code> to the stream.</li>
|
||||
<li><code>int[][] getIntervals()</code> Returns a summary of the integers in the stream currently as a list of disjoint intervals <code>[start<sub>i</sub>, end<sub>i</sub>]</code>.</li>
|
||||
<li><code>void addNum(int value)</code> Adds the integer <code>value</code> to the stream.</li>
|
||||
<li><code>int[][] getIntervals()</code> Returns a summary of the integers in the stream currently as a list of disjoint intervals <code>[start<sub>i</sub>, end<sub>i</sub>]</code>. The answer should be sorted by <code>start<sub>i</sub></code>.</li>
|
||||
</ul>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input</strong>
|
||||
@@ -36,8 +36,9 @@ summaryRanges.getIntervals(); // return [[1, 3], [6, 7]]
|
||||
<p><strong>Constraints:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>0 <= val <= 10<sup>4</sup></code></li>
|
||||
<li><code>0 <= value <= 10<sup>4</sup></code></li>
|
||||
<li>At most <code>3 * 10<sup>4</sup></code> calls will be made to <code>addNum</code> and <code>getIntervals</code>.</li>
|
||||
<li>At most <code>10<sup>2</sup></code> calls will be made to <code>getIntervals</code>.</li>
|
||||
</ul>
|
||||
|
||||
<p> </p>
|
||||
|
Reference in New Issue
Block a user