---
title: "Discussion on \"Count of Positive and Negative Integers\" | Hashnode"
description: "Discussion on \"Count of Positive and Negative Integers\". # written by Ashir O(logn)\nclass Solution:\n    def maximumCount(self, nums: List[int]) -> int:\n\n        l, r = 0, len(nums) - 1\n        count_pos = 0\n        count_neg = 0\n        zeros = 0\n\n        if nums[0] == 0 and nums[-1] == 0:\n            retu..."
url: "https://hashnode.com/posts/count-of-positive-and-negative-integers/666a22b68a7ac5dfc4098d35"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Count of Positive and Negative Integers](https://ashirmehmood.hashnode.dev/count-of-positive-and-negative-integers?utm_source=hashnode&utm_medium=feed)

\# written by Ashir O(logn) class Solution: def maximumCount(self, nums: List\[int\]) -> int: l, r = 0, len(nums) - 1 count\_pos = 0 count\_neg = 0 zeros = 0 if nums\[0\] == 0 and nums\[-1\] == 0: retu...

Jun 12, 2024 · 1 min read · ashirmehmood.hashnode.dev  
Read the article

## Written by

[Ashir](https://hashnode.com/@AshirMehmood)

@AshirMehmood

  
[View profile](https://hashnode.com/@AshirMehmood)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
