Skip to content

Commit

Permalink
更新 0674.最长连续递增序列 排版格式修复
Browse files Browse the repository at this point in the history
  • Loading branch information
jinbudaily committed Jul 26, 2023
1 parent 6b32268 commit 038d509
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
24 changes: 11 additions & 13 deletions problems/0300.最长上升子序列.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

## 算法公开课

**《代码随想录》算法视频公开课:[动态规划之子序列问题,元素不连续!| LeetCode:300.最长递增子序列](https://www.bilibili.com/video/BV1ng411J7xP),相信结合视频再看本篇题解,更有助于大家对本题的理解**
**[《代码随想录》算法视频公开课](https://programmercarl.com/other/gongkaike.html)[动态规划之子序列问题,元素不连续!| LeetCode:300.最长递增子序列](https://www.bilibili.com/video/BV1ng411J7xP),相信结合视频再看本篇题解,更有助于大家对本题的理解**


## 思路
Expand Down Expand Up @@ -124,8 +124,8 @@ public:
## 其他语言版本
### Java:
Java:
```Java
class Solution {
public int lengthOfLIS(int[] nums) {
Expand All @@ -147,7 +147,7 @@ class Solution {
}
```

Python:
### Python:

DP
```python
Expand Down Expand Up @@ -189,7 +189,8 @@ class Solution:
return len(tails) # 返回递增子序列的长度

```
Go:
### Go:

```go
// 动态规划求解
func lengthOfLIS(nums []int) int {
Expand Down Expand Up @@ -248,7 +249,8 @@ func lengthOfLIS(nums []int ) int {
}
```

Javascript
### Javascript:

```javascript
const lengthOfLIS = (nums) => {
let dp = Array(nums.length).fill(1);
Expand All @@ -267,7 +269,7 @@ const lengthOfLIS = (nums) => {
};
```

TypeScript
### TypeScript:

```typescript
function lengthOfLIS(nums: number[]): number {
Expand All @@ -288,7 +290,8 @@ function lengthOfLIS(nums: number[]): number {
};
```

Rust:
### Rust:

```rust
pub fn length_of_lis(nums: Vec<i32>) -> i32 {
let mut dp = vec![1; nums.len() + 1];
Expand All @@ -307,13 +310,8 @@ pub fn length_of_lis(nums: Vec<i32>) -> i32 {









<p align="center">
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
</a>

18 changes: 10 additions & 8 deletions problems/0674.最长连续递增序列.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

## 算法公开课

**《代码随想录》算法视频公开课:[动态规划之子序列问题,重点在于连续!| LeetCode:674.最长连续递增序列](https://www.bilibili.com/video/BV1bD4y1778v),相信结合视频再看本篇题解,更有助于大家对本题的理解**
**[《代码随想录》算法视频公开课](https://programmercarl.com/other/gongkaike.html)[动态规划之子序列问题,重点在于连续!| LeetCode:674.最长连续递增序列](https://www.bilibili.com/video/BV1bD4y1778v),相信结合视频再看本篇题解,更有助于大家对本题的理解**


## 思路
Expand Down Expand Up @@ -157,8 +157,7 @@ public:

## 其他语言版本


Java:
### Java:

> 动态规划:
```java
Expand Down Expand Up @@ -207,7 +206,7 @@ public static int findLengthOfLCIS(int[] nums) {
}
```

Python:
### Python:

DP
```python
Expand Down Expand Up @@ -261,7 +260,8 @@ class Solution:
return result
```

Go:
### Go:

> 动态规划:
```go
func findLengthOfLCIS(nums []int) int {
Expand Down Expand Up @@ -302,7 +302,8 @@ func findLengthOfLCIS(nums []int) int {
}
```

Rust:
### Rust:

```rust
pub fn find_length_of_lcis(nums: Vec<i32>) -> i32 {
if nums.is_empty() {
Expand All @@ -320,7 +321,7 @@ pub fn find_length_of_lcis(nums: Vec<i32>) -> i32 {
}
```

Javascript:
### Javascript:

> 动态规划:
```javascript
Expand Down Expand Up @@ -363,7 +364,7 @@ const findLengthOfLCIS = (nums) => {
};
```

TypeScript:
### TypeScript:

> 动态规划:
Expand Down Expand Up @@ -409,3 +410,4 @@ function findLengthOfLCIS(nums: number[]): number {
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
</a>

0 comments on commit 038d509

Please sign in to comment.