Sunday common C++ interview problem: Count smaller elements after.
Given an array of integers "values" as std::vector<int>, return an array "counts", where counts[i] represents the number of elements smaller than values[i] to the right of values[i] (i.e. values[j] where j>i).
Solve it yourself: https://compiler-explorer.com/z/seGx61cnE
Solution: https://compiler-explorer.com/z/rvzePaxT6