Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| 31 |
Tags
- 개발자
- Python
- 데이터베이스
- 데이터
- 대학생
- 컴퓨터공학
- adaptive remeshing
- Mesh
- SQL
- GNN
- 컴퓨터사이언스
- 자료구조
- DS
- 티스토리챌린지
- meshgraphnet
- 오블완
- Leet Code
- 코딩테스트
- CS
- coding
- sort
- mysql
- LeetCode
- 코테
- 데베
- Database
- db
- Data_Structure
- code
- CNN
Archives
- Today
- Total
sy1214ei 님의 블로그
[Leet Code] 628. Maximum Product of Three Numbers - Python 본문
class Solution:
def maximumProduct(self, nums: List[int]) -> int:
nums = sorted(nums)
return max(nums[0]*nums[1]*nums[-1],nums[-1]*nums[-2]*nums[-3])
'[Coding]' 카테고리의 다른 글
| [Leet Code] 58. Length of Last Word - Python (4) | 2024.11.26 |
|---|---|
| [Leet Code] 747. Largest Number At Least Twice of Others - Python (0) | 2024.11.25 |
| [Leet Code] 594. Longest Harmonious Subsequence - Python (0) | 2024.11.25 |
| [Leet Code] 561. Array Partition (0) | 2024.11.25 |
| [Leet Code] 414. Third Maximum Number (1) | 2024.11.25 |