Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
leetcode: finished #151
Browse files Browse the repository at this point in the history
  • Loading branch information
xqm32 committed Mar 8, 2024
1 parent 4172326 commit 23b2e7a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions content/leetcode/2024/3.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,26 @@ title: 2024.3
draft: false
---

# 2024.3.8

```typescript
/*
* @lc app=leetcode.cn id=151 lang=typescript
*
* [151] 反转字符串中的单词
*/

// @lc code=start
function reverseWords(s: string): string {
return s
.split(" ")
.filter((item) => item !== "")
.reverse()
.join(" ");
}
// @lc code=end
```

# 2024.3.7

```typescript
Expand Down

0 comments on commit 23b2e7a

Please sign in to comment.