Count Dominant Indices
An element is dominant when it exceeds the average of everything after it, which can be checked with a running suffix sum and an integer comparison.
An element is dominant when it exceeds the average of everything after it, which can be checked with a running suffix sum and an integer comparison.