commit
e68dcc8c41
|
@ -5694,7 +5694,7 @@ Output: 5
|
||||||
Explanation: The longest harmonious subsequence is [3,2,2,2,3].
|
Explanation: The longest harmonious subsequence is [3,2,2,2,3].
|
||||||
```
|
```
|
||||||
|
|
||||||
和谐序列中最大数和最小数只差正好为 1,应该注意的是序列的元素不一定是数组的连续元素。
|
和谐序列中最大数和最小数之差正好为 1,应该注意的是序列的元素不一定是数组的连续元素。
|
||||||
|
|
||||||
```java
|
```java
|
||||||
public int findLHS(int[] nums) {
|
public int findLHS(int[] nums) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user