2148. Count Elements With Strictly Smaller and Greater Elements

Обновлено: 2024-03-12
1 мин
[]

Содержание

LeetCode problem 2148

class Solution:
    def countElements(self, nums: List[int]) -> int:
        mi, mx = min(nums), max(nums)
        return sum(mi < num < mx for num in nums)