Limits: 2s, 1.0 GB
A number is called a Zig-zag number if the differences between consecutive digits alternate between positive and negative. A Zig-zag number has the following properties.
This is a companion discussion topic for the original entry at https://toph.co/p/zigzag-number