1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-13 03:11:42 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

存量题库数据更新

This commit is contained in:
2023-12-09 18:42:21 +08:00
parent a788808cd7
commit c198538f10
10843 changed files with 288489 additions and 248355 deletions

View File

@@ -8,7 +8,8 @@
<p><strong>示例 1</strong></p>
<pre><strong>输入:</strong>arr = [1,4,2,5,3]
<pre>
<strong>输入:</strong>arr = [1,4,2,5,3]
<strong>输出:</strong>58
<strong>解释:</strong>所有奇数长度子数组和它们的和为:
[1] = 1
@@ -24,13 +25,15 @@
<p><strong>示例 2</strong></p>
<pre><strong>输入:</strong>arr = [1,2]
<pre>
<strong>输入:</strong>arr = [1,2]
<strong>输出:</strong>3
<strong>解释:</strong>总共只有 2 个长度为奇数的子数组,[1] 和 [2]。它们的和为 3 。</pre>
<p><strong>示例 3</strong></p>
<pre><strong>输入:</strong>arr = [10,11,12]
<pre>
<strong>输入:</strong>arr = [10,11,12]
<strong>输出:</strong>66
</pre>
@@ -42,3 +45,9 @@
<li><code>1 &lt;= arr.length &lt;= 100</code></li>
<li><code>1 &lt;= arr[i] &lt;= 1000</code></li>
</ul>
<p>&nbsp;</p>
<p><strong>进阶:</strong></p>
<p>你可以设计一个 O(n) 时间复杂度的算法解决此问题吗?</p>