Count Positive Numbers
EasyArray
Description
Given an array of integers nums, return how many values are strictly greater than zero.
Examples
Input:
nums = [-1,2,-3,4]Output:
2Explanation:
There are 2 numbers in the list greater than zero.
Input:
nums = [0,0,0]Output:
0Explanation:
There are 0 numbers in the list greater than zero.
Input:
nums = [5,6,7]Output:
3Explanation:
There are 3 numbers in the list greater than zero.
Constraints
- •
1 ≤ nums.length ≤ 10⁴ - •
-10⁹ ≤ nums[i] ≤ 10⁹