![:)](./images/smilies/icon_smile.gif)
I checked that 0,1,2,3...n-1 alter directions, then that 0,2,4,6,... alter directions, then that 0,3,6,9,... alter directions and so on. However, sub-sequences like 1,3,5 wouldn't be tested and that killed the method with smallest counter-example of 6 items. Fortunately (or not) it wasn't in test data. It is: 0 4 2 1 3 5. If we check same way from the higher end, than smallest counter-example consists of 7 items.
My head was too full with number of inverses by the time I developed that wrong algorithm. I am sorry
![:)](./images/smilies/icon_smile.gif)