I have the following problem I need to optimize. For a given array(with duplicated keys allowed), for each position I have the following problem I need to optimize
I have the following problem I need to optimize. For a given array(with duplicated keys allowed), for each position I have the following problem I need to optimize