Page 1 of 1

In python please. You are given an array of arrays a. Your task is to group the arrays a[i] by their mean values, so tha

Posted: Sun May 15, 2022 11:46 am
by answerhappygod
In python please.
You are given an array of arrays a. Your
task is to group the arrays a by
their mean values, so that arrays with equal mean values
are in the same group, and arrays with different mean values are in
different groups.
Each group should contain a set of indices
(i, j, etc), such that the
corresponding arrays
(a, a[j], etc) all have
the same mean. Return the set of groups as an array of arrays,
where the indices within each group are sorted in ascending order,
and the groups are sorted in ascending order of their minimum
element.