标签:数组 ble ems time == str sel space leetcode
1 class Solution: 2 def numTimesAllBlue(self, light: ‘List[int]‘) -> int: 3 right,res = 0,0 4 for i, a in enumerate(light, start=1): 5 right = max(right, a) 6 if right == i: 7 res += 1 8 return res
算法思路:数组。
标签:数组 ble ems time == str sel space leetcode
原文地址:https://www.cnblogs.com/asenyang/p/12442122.html