Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2529. Maximum Count of Positive Integer and Negative Integer
Given a non-decreasing sorted array, return the larger of the counts of positive and negative numbers (zeros are ignored). Because the array is sorted, you can compute these counts in O(log n) by binary-searching the boundaries between negative/zero/positive regions.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.