2529. Maximum Count of Positive Integer and Negative Integer
Given an array
numssorted in non-decreasing order, return the maximum between the number of positive integers and the number of negative integers.
- In other words, if the number of positive integers in
numsisposand the number of negative integers isneg, then return the maximum ofposandneg.Note that
0is neither positive nor negative.
1 | class Solution { |