
Problem
Solution 1
Analysis
Python implementation
|
|
Java implementation
|
|
Time complexity
O(nlogn).
Space complexity
O(nlogn).
Solution 2
Analysis
Python implementation
|
|
Java implementation
|
|
Time complexity
O(n).
Space complexity
O(1).
Link
628. Maximum Product of Three Numbers
(中文版) 算法笔记: 力扣#628 三个数的最大乘积




近期评论