You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: solution/0800-0899/0898.Bitwise ORs of Subarrays/README_EN.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,11 @@
4
4
5
5
## Description
6
6
7
-
<p>We have an array <code>arr</code>of non-negative integers.</p>
7
+
<p>Given an integer array <code>arr</code>, return <em>the number of distinct bitwise ORs of all the non-empty subarrays of</em> <code>arr</code>.</p>
8
8
9
-
<p>For every (contiguous) subarray <code>sub = [arr[i], arr[i + 1], ..., arr[j]]</code> (with <code>i <= j</code>), we take the bitwise OR of all the elements in <code>sub</code>, obtaining a result <code>arr[i] | arr[i + 1] | ... | arr[j]</code>.</p>
9
+
<p>The bitwise OR of a subarray is the bitwise OR of each integer in the subarray. The bitwise OR of a subarray of one integer is that integer.</p>
10
10
11
-
<p>Return the number of possible results. Results that occur more than once are only counted once in the final answer</p>
11
+
<p>A <strong>subarray</strong> is a contiguous non-empty sequence of elements within an array.</p>
12
12
13
13
<p> </p>
14
14
<p><strongclass="example">Example 1:</strong></p>
@@ -41,8 +41,8 @@ There are 3 unique values, so the answer is 3.
Copy file name to clipboardexpand all lines: solution/1000-1099/1027.Longest Arithmetic Subsequence/README_EN.md
+10-8
Original file line number
Diff line number
Diff line change
@@ -4,36 +4,38 @@
4
4
5
5
## Description
6
6
7
-
<p>Given an array <code>nums</code> of integers, return the <strong>length</strong> of the longest arithmetic subsequence in <code>nums</code>.</p>
7
+
<p>Given an array <code>nums</code> of integers, return <em>the length of the longest arithmetic subsequence in</em> <code>nums</code>.</p>
8
8
9
-
<p>Recall that a <em>subsequence</em> of an array <code>nums</code> is a list <code>nums[i<sub>1</sub>], nums[i<sub>2</sub>], ..., nums[i<sub>k</sub>]</code> with <code>0 <= i<sub>1</sub> < i<sub>2</sub> < ... < i<sub>k</sub> <= nums.length - 1</code>, and that a sequence <code>seq</code> is <em>arithmetic</em> if <code>seq[i+1] - seq[i]</code> are all the same value (for <code>0 <= i < seq.length - 1</code>).</p>
9
+
<p><strong>Note</strong> that:</p>
10
+
11
+
<ul>
12
+
<li>A <strong>subsequence</strong> is an array that can be derived from another array by deleting some or no elements without changing the order of the remaining elements.</li>
13
+
<li>A sequence <code>seq</code> is arithmetic if <code>seq[i + 1] - seq[i]</code> are all the same value (for <code>0 <= i < seq.length - 1</code>).</li>
14
+
</ul>
10
15
11
16
<p> </p>
12
17
<p><strongclass="example">Example 1:</strong></p>
13
18
14
19
<pre>
15
20
<strong>Input:</strong> nums = [3,6,9,12]
16
21
<strong>Output:</strong> 4
17
-
<strong>Explanation: </strong>
18
-
The whole array is an arithmetic sequence with steps of length = 3.
22
+
<strong>Explanation: </strong> The whole array is an arithmetic sequence with steps of length = 3.
19
23
</pre>
20
24
21
25
<p><strongclass="example">Example 2:</strong></p>
22
26
23
27
<pre>
24
28
<strong>Input:</strong> nums = [9,4,7,2,10]
25
29
<strong>Output:</strong> 3
26
-
<strong>Explanation: </strong>
27
-
The longest arithmetic subsequence is [4,7,10].
30
+
<strong>Explanation: </strong> The longest arithmetic subsequence is [4,7,10].
28
31
</pre>
29
32
30
33
<p><strongclass="example">Example 3:</strong></p>
31
34
32
35
<pre>
33
36
<strong>Input:</strong> nums = [20,1,15,3,10,5,8]
34
37
<strong>Output:</strong> 4
35
-
<strong>Explanation: </strong>
36
-
The longest arithmetic subsequence is [20,15,10,5].
38
+
<strong>Explanation: </strong> The longest arithmetic subsequence is [20,15,10,5].
Copy file name to clipboardexpand all lines: solution/1200-1299/1207.Unique Number of Occurrences/README_EN.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
## Description
6
6
7
-
<p>Given an array of integers <code>arr</code>, return <code>true</code> if the number of occurrences of each value in the array is <strong>unique</strong>, or <code>false</code> otherwise.</p>
7
+
<p>Given an array of integers <code>arr</code>, return <code>true</code> <em>if the number of occurrences of each value in the array is <strong>unique</strong> or </em><code>false</code><em> otherwise</em>.</p>
0 commit comments