Python | Leetcode Python题解之第334题递增的三元子序列
题目: 题解: class Solution:def increasingTriplet(self, nums: List[int]) -> bool:n len(nums)if n < 3:return Falsefirst, second nums[0], float(inf)for i in range(1, n):num nums[i]if num > second:return Trueif num > first…
2025-02-11