Link: https://x.com/kom_senapati/status/1785128802777194571
- Stored count of positive numbers in p
- Then returned it and negetive number count (excluding zeroes) in a list
class Solution:
# @param A : list of integers
# @return a list of integers
def solve(self, A):
p = len([n for n in A if n > 0])
return [p, len(A) - p - A.count(0)]