Groups
Category
Double counting is the strategy of counting the same quantity in two different ways to derive an equality or an efficient algorithm.
The contribution technique flips perspective: compute how much each element contributes to the total, then sum these contributions.