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