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

Commit

Permalink
leetcode: finished #2733
Browse files Browse the repository at this point in the history
  • Loading branch information
xqm32 committed Jul 20, 2023
1 parent b7dca83 commit 2e631fb
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions content/leetcode/2023/7.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,32 @@ title: "2023.7"
draft: false
---

# 2023.7.20

```python
#
# @lc app=leetcode.cn id=2733 lang=python3
#
# [2733] 既不是最小值也不是最大值
#

# @lc code=start
from typing import List


class Solution:
def findNonMinOrMax(self, nums: List[int]) -> int:
min_value = min(nums)
max_value = max(nums)
for num in nums:
if num != min_value and num != max_value:
return num
return -1


# @lc code=end
```

# 2023.7.19

```python
Expand Down

0 comments on commit 2e631fb

Please sign in to comment.