Problem statement:

Given an array of N numbers, find a longest zig-zag subsequence.
A zig-zag subsequence is a combination of a strictly increasing
subsequence and a strictly decreasing subsequence.
5 9 4 6 2 is zig-zag because 5 < 9 > 4 < 6 > 2
9 5 7 4 6 is also zig-zag    9 > 5 < 7 > 4 < 6

You must implement sequence.solve(array), and return a list with
the indices of a longest subsequence in the original array.

Example:
i        0 1 2 3 4 5 6
array[i] 1 2 3 1 2 3 4

A solution would be [0, 1, 5, 6] corresponding to the values
1 2 3 4.
