My gut reaction was this was unnecessarily complicated. But, the context here is complex to have us practice with the mechanics of functions and arrays.
It does violate the one-line restriction, which is really meant to be 1 statement restrictions (just worded on purpose incorrectly to avoid confusion).
As it's very unique, I may not worry about--not enough bang for the buck--but I could check for output by testing it on a random-ishly generated array that's not given to the user, just to make sure it's calling the functions in the right order/accessing the problem array indices. Or maybe use spyon to do this. Too much work just for this type of sol'n, but would have the benefit of checking more accurately for others.
So, for me