Tap here to switch tabs
Problem
Submissions

Problem: Count Dominant Indices

med
30 min
Try to solve the Count Dominant Indices problem.

Statement

You are given an integer array nums.

An index i is called dominant if there is at least 11 element strictly to its right, and nums[i] is strictly greater than the average of all elements to its right.

Return the total number of dominant indices in nums.

Constraints:

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

  • 1≤1 \leq nums[i] ≤100\leq 100

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count Dominant Indices

med
30 min
Try to solve the Count Dominant Indices problem.

Statement

You are given an integer array nums.

An index i is called dominant if there is at least 11 element strictly to its right, and nums[i] is strictly greater than the average of all elements to its right.

Return the total number of dominant indices in nums.

Constraints:

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

  • 1≤1 \leq nums[i] ≤100\leq 100