Clarification needed for SEPT2014-SEABUB

Now Sereja’s goal is to make the expected value of the function f(A) as minimal as possible, by doing no more than k actions.

Lets say my solution makes x actions(x<=k)

is f(A) calculated on an array obtained after we’ve done x actions(x<=k) ?

OR

is f(A) calculated by adding up all the consecutive swaps made so far, i.e after x actions(x<=k)?

f(A) is computed on the final array (after performing your x actions) - at least that’s how I interpreted the statement.

1 Like

Thanks…

//