Tap here to switch tabs
Problem
Submissions

Problem: Maximum Count of Positive Integer and Negative Integer

Try to solve the Maximum Count of Positive Integer and Negative Integer problem.

Statement

Given an integer array nums sorted in nondecreasing order, return the maximum value between the count of positive integers and the count of negative integers.

Note: The integer 00 is neither positive nor negative.

Constraints:

  • 1≤1 \leq nums.length ≤2000\leq 2000

  • −2000≤-2000 \leq nums[i] ≤2000\leq 2000

  • nums is sorted in nondecreasing order.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Maximum Count of Positive Integer and Negative Integer

Try to solve the Maximum Count of Positive Integer and Negative Integer problem.

Statement

Given an integer array nums sorted in nondecreasing order, return the maximum value between the count of positive integers and the count of negative integers.

Note: The integer 00 is neither positive nor negative.

Constraints:

  • 1≤1 \leq nums.length ≤2000\leq 2000

  • −2000≤-2000 \leq nums[i] ≤2000\leq 2000

  • nums is sorted in nondecreasing order.